VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: [1] 2

Author Topic: mysqld OPPS  (Read 495 times)

StrayBit

  • Vectorite
  • ***
  • Posts: 487
mysqld OPPS
« on: March 15, 2017, 02:10:52 pm »

I am working with VL7.2beta and am trying to get mysql running.
I have tried
Quote
bruce: mysqld&
and
Quote
root: mysqld&
In both cases it finally exits.  During the process (in thunar) I created /var/mysql directory and changed the permissions so everyone had read/write.  Perhaps I need to do something else?
« Last Edit: March 24, 2017, 03:41:05 pm by StrayBit »
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld
« Reply #1 on: March 21, 2017, 11:23:08 am »

Further "playing"
Quote
vector://home/bruce
root:# mysql_install_db --user=mysql
2017-03-21 17:15:56 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2017-03-21 17:15:56 [ERROR]   The data directory needs to be specified.
vector://home/bruce
root:# mysqld --initialize
2017-03-21T23:18:27.167927Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-03-21T23:18:27.390065Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-03-21T23:18:27.390190Z 0 [ERROR] Aborting
I haven't been able to figure out what documentation or file it is reading to figure out the context of these statements.
Quote
vector://home/bruce
root:# mysql restart
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
There is no mysqld directory in /run - ah there is one in /usr/run but it is empty
Upon perusal of info mysqld, I realize that it is for client operations - not server!
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3441
Re: mysqld
« Reply #2 on: March 22, 2017, 07:35:12 am »

So it looks like our package could use some tweaking.

I have successfully launched the mysql daemon my doing following these steps.

1. slapt-get -i mysql
2. mkdir /run/mysqld
3. chown mysql:mysql /run/mysqld
4. mysqld --initialize --user=mysql
5. chmod +x /etc/rc.d/rc.mysqld
6. /etc/rc.d/rc.mysqld stop
7. /etc/rc.d/rc.mysqld start

Let me know if this works for you and I can get the package fixed so that this is done automatically.  You will need to uninstall mysql and remove /var/lib/mysqld so you can re-test this.

As a side note, mysql has been replaced with mariadb, you may want to try that instead (but we still need to fix the mysql package)

Hope this helps

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld
« Reply #3 on: March 22, 2017, 08:19:47 am »

Quote
vector://home/bruce
root:# slapt-get -i mysql
Reading Package Lists...Done
mysql is up to date.
0 upgraded, 0 reinstalled, 0 newly installed, 0 to remove, 0 not upgraded.

Done
vector://home/bruce
root:# mkdir /run/mysqld
vector://home/bruce
root:# chown mysql:mysql /run/mysqld
vector://home/bruce
root:# mysqld --initialize --user=mysql
2017-03-22T15:01:45.203512Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-03-22T15:01:45.458954Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-03-22T15:01:45.459054Z 0 [ERROR] Aborting

vector://home/bruce
root:# chmod +x /etc/rc.d/rc.mysqld
vector://home/bruce
root:# /etc/rc.d/rc.mysqld stop
vector://home/bruce
root:# /etc/rc.d/rc.mysqld start
vector://home/bruce
root:# 2017-03-22T15:02:59.752529Z mysqld_safe Logging to '/var/lib/mysql/vector.err'.
Logging to '/var/lib/mysql/vector.err'.
2017-03-22T15:02:59.830918Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-03-22T15:03:10.499133Z mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
It was unable to open the index file
PS: It doesn't help to skip a step!  As soon as I get back, I'll try starting httpd.
« Last Edit: March 22, 2017, 08:36:20 am by StrayBit »
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld
« Reply #4 on: March 22, 2017, 09:19:13 am »

Had shut down after previous post.
Quote
vector://home/bruce
root:# /etc/rc.d/rc.mysqld start
vector://home/bruce
root:# 2017-03-22T16:05:24.104356Z mysqld_safe Logging to '/var/lib/mysql/vector.err'.
2017-03-22T16:05:24.109989Z mysqld_safe Logging to '/var/lib/mysql/vector.err'.
2017-03-22T16:05:24.115696Z mysqld_safe Directory '/run/mysqld' for UNIX socket file don't exists.
vector://home/bruce
root:# httpd -k start
Still no joy!  I must be missing something else!
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3441
Re: mysqld
« Reply #5 on: March 22, 2017, 09:56:12 am »

Start all over again.
removepkg mysql
rm -rf /var/{lib,run}/mysql
slapt-get -i mysql
mkdir /run/mysqld
chown mysql:mysql /run/mysqld
mysqld --initialize --user=mysql

on
and on
and on

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld
« Reply #6 on: March 23, 2017, 07:59:21 am »

Quote
...
Executing install script for mysql-5.7.17-i686-1vl72...
groupadd: group 'mysql' already exists
useradd: user 'mysql' already exists


Remember to check the new configuration files:
/etc/rc.d/rc.mysqld.new
Done
vector://home/bruce
root:# mkdir /run/mysqld
vector://home/bruce
root:# chown mysql:mysql /run/mysqld
vector://home/bruce
root:# mysqld --initialize --user=mysql
2017-03-23T14:55:18.169282Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-03-23T14:55:18.230402Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-03-23T14:55:18.230498Z 0 [ERROR] Aborting
Should I go on
and on
and on?  ;D

Quote
vector://home/bruce
root:# /etc/rc.d/rc.mysqld restart
vector://home/bruce
root:# 2017-03-24T15:04:37.137120Z mysqld_safe Logging to '/var/lib/mysql/vector.err'.
Logging to '/var/lib/mysql/vector.err'.
2017-03-24T15:04:37.213905Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-03-24T15:04:37.967122Z mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
Thanks, MOE-lnx
« Last Edit: March 24, 2017, 08:06:28 am by StrayBit »
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3441
Re: mysqld
« Reply #7 on: March 24, 2017, 06:36:35 am »

This line
Quote
2017-03-23T14:55:18.230402Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
indicates the mysql data dir is not empty.  The --initialize command does not want to overwrite your data there, so see  if 'ls /var/lib/mysql/ has files in it and if so, try removing them

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld
« Reply #8 on: March 24, 2017, 08:02:07 am »

/var/lib/mysql/ did have files.  Fortunately, I made a backup copy before removing them.  DIDN'T WORK!
Tried the same with /srv/mysql/  IT WORKED!
Now to figure out where I was and continue on
and on
and on.
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld OPPS
« Reply #9 on: March 24, 2017, 04:39:18 pm »

OK!  I thought this was solved.  That was a premature thought!  (There I go - thoughting again!)
Thanks to a lot of help, MySqld and httpd are running.  Unfortunately: putting http://idlegion39///wp-admin/install.php in my browser (idlegion39 is localhost)
Quote
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I've looked in the httpd/*.conf files but can find no instance of mysql being specified.
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

retired1af

  • Administrator
  • Vectorian
  • *****
  • Posts: 1446
Re: mysqld OPPS
« Reply #10 on: March 25, 2017, 06:35:30 am »

The extension will be called in php.ini.

Look for: ;extension=mysql.so

Remove the semicolon, save the file and restart httpd.
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld OPPS
« Reply #11 on: March 25, 2017, 01:44:53 pm »

I don't know if this is relevant to anything
Quote
root:# find / -name 'php.ini'
find: `/home/bruce/.gvfs': Permission denied
find: `/var/lib/gdm/.gvfs': Permission denied
find: WARNING: Hard link count is wrong for `/proc/fs' (saw only st_nlink=9 but we already saw 7 subdirectories): this may be a bug in your file system driver.  Automatically turning on find's -noleaf option.  Earlier results may have failed to include directories that should have been searched.
Permission denied? to root!! I was unable to locate php.ini anywhere - not even a google search, although that did tell my where it should be as well as samples on the local system should be.
Finally, after searching for an hour, found one on the net.  After spending two hours removing half of the leading line numbers, decided it would be less error prone if I wrote a C program to remove them.  That only took a bit over an hour.  So much about programming that I have forgotten!
Putting that into public_html and restarting httpd was no joy.
Quote
root:# find / -name 'mysql.so'
find: `/home/bruce/.gvfs': Permission denied
/mnt/VL7.1/usr/lib/php/extensions/mysql.so
find: `/var/lib/gdm/.gvfs': Permission denied
find: WARNING: Hard link count is wrong for `/proc/fs' (saw only st_nlink=9 but we already saw 7 subdirectories): this may be a bug in your file system driver.  Automatically turning on find's -noleaf option.  Earlier results may have failed to include directories that should have been searched.
Should have found this 5 hours ago.  Probably would have if fstab didn't have a wrong file type!
Copied from 7.1 installation to the same location in 7.2:  It already had the extension enabled.  Still no joy!
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld OPPS
« Reply #12 on: April 01, 2017, 12:23:09 pm »

Thought I had already mentioned this:  when I send my browser to localhost (aka idlegion39), it opens the index file.  but if I try to open wp-admin/wp-install.php, I get
Quote
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Apparently, just installing and running mysql is not enough!
I can find no place in the httpd.conf or mod_php.conf files that refers to mysql.  There several in php.ini but they seem to be setting variables.
Any suggestions?
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0

retired1af

  • Administrator
  • Vectorian
  • *****
  • Posts: 1446
Re: mysqld OPPS
« Reply #13 on: April 01, 2017, 07:26:37 pm »

Again. php.ini is where the extension will be called. You may have more than one copy floating around on your system (it happens).
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

StrayBit

  • Vectorite
  • ***
  • Posts: 487
Re: mysqld OPPS
« Reply #14 on: April 02, 2017, 11:33:37 am »

Any idea where it is to be located?  I put this on in public_html.
Logged
Dell GX280: 7.1-Gold 32 bit
HP 670 Win7 & VL7.0
Pages: [1] 2