Hi, I cannot seem to start the mysqld-deamon (using the mysqld_safe script). The /var/lib/mysql/mysql.log file looks like : 040404 15:06:02 mysqld started InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 040404 15:06:03 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 040404 15:06:04 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 040404 15:06:05 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 040404 15:06:08 InnoDB: Started 040404 15:06:08 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 040404 15:06:08 Aborting 040404 15:06:08 InnoDB: Starting shutdown... 040404 15:06:11 InnoDB: Shutdown completed 040404 15:06:11 /usr/sbin/mysqld-max: Shutdown Complete 040404 15:06:11 mysqld ended however, the file ./mysql/host.frm does exist : SusiX:/var/lib/mysql # ls -l mys* -rw-rw---- 1 mysql root 1552 2004-04-04 17:17 mysqld.log mysql: total 105 drwx------ 2 root root 528 2004-04-04 14:17 . drwxr-xr-x 4 mysql daemon 256 2004-04-04 17:17 .. -rw-rw---- 1 root root 8778 2004-04-04 14:17 columns_priv.frm -rw-rw---- 1 root root 0 2004-04-04 14:17 columns_priv.MYD -rw-rw---- 1 root root 1024 2004-04-04 14:17 columns_priv.MYI -rw-rw---- 1 root root 9088 2004-04-04 14:17 db.frm -rw-rw---- 1 root root 306 2004-04-04 14:17 db.MYD -rw-rw---- 1 root root 3072 2004-04-04 14:17 db.MYI -rw-rw---- 1 root root 8641 2004-04-04 14:17 func.frm -rw-rw---- 1 root root 0 2004-04-04 14:17 func.MYD -rw-rw---- 1 root root 1024 2004-04-04 14:17 func.MYI -rw-rw---- 1 root root 9064 2004-04-04 14:17 host.frm -rw-rw---- 1 root root 0 2004-04-04 14:17 host.MYD -rw-rw---- 1 root root 1024 2004-04-04 14:17 host.MYI -rw-rw---- 1 root root 8877 2004-04-04 14:17 tables_priv.frm -rw-rw---- 1 root root 0 2004-04-04 14:17 tables_priv.MYD -rw-rw---- 1 root root 1024 2004-04-04 14:17 tables_priv.MYI -rw-rw---- 1 root root 9806 2004-04-04 14:17 user.frm -rw-rw---- 1 root root 160 2004-04-04 14:17 user.MYD -rw-rw---- 1 root root 2048 2004-04-04 14:17 user.MYI As a consequence (I think) any attemp to start an mysql client ends with : SusiX:/var/lib/mysql# mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/ mysql/mysql.sock' (2) Anyone an idea of what is wrong and how to make it work ? Thanks, Frederic
On Sunday 04 April 2004 17.32, Frederic Durodie wrote:
Hi,
I cannot seem to start the mysqld-deamon (using the mysqld_safe script). The /var/lib/mysql/mysql.log file looks like :
Use /etc/init.d/mysql start (or rcmysql start - same thing, fewer characters to type) to start it instead. It uses mysql_safe. If you look at how that calls mysql_safe you might see what you did wrong
On Sunday 04 April 2004 17:52, Anders Johansson wrote:
Use /etc/init.d/mysql start (or rcmysql start - same thing, fewer characters to type) to start it instead. It uses mysql_safe. If you look at how that calls mysql_safe you might see what you did wrong
I tried this but unfortunately to no avail ... SusiX:/var/lib/mysql # /etc/init.d/mysql start Starting service MySQL failed 040404 17:54:55 mysqld started 040404 17:54:57 InnoDB: Started 040404 17:54:57 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 040404 17:54:57 Aborting 040404 17:54:57 InnoDB: Starting shutdown... 040404 17:54:59 InnoDB: Shutdown completed 040404 17:54:59 /usr/sbin/mysqld-max: Shutdown Complete 040404 17:54:59 mysqld ended Thanks anyway. Frederic
On Sunday 04 April 2004 18.10, Frederic Durodie wrote:
On Sunday 04 April 2004 17:52, Anders Johansson wrote:
Use /etc/init.d/mysql start (or rcmysql start - same thing, fewer characters to type) to start it instead. It uses mysql_safe. If you look at how that calls mysql_safe you might see what you did wrong
I tried this but unfortunately to no avail ...
SusiX:/var/lib/mysql # /etc/init.d/mysql start Starting service MySQL failed
040404 17:54:55 mysqld started 040404 17:54:57 InnoDB: Started 040404 17:54:57 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 040404 17:54:57 Aborting 040404 17:54:57 InnoDB: Starting shutdown... 040404 17:54:59 InnoDB: Shutdown completed 040404 17:54:59 /usr/sbin/mysqld-max: Shutdown Complete 040404 17:54:59 mysqld ended
This is because you ran the mysql script manually as root first. This screws up ownership and permissions. If you don't have any data there, the simplest is to start over completely with "rm -rf /var/lib/mysql/mysql" and let it get regenerated with "rcmysql start" Otherwise, do "chown -R mysql.daemon /var/lib/mysql" and "mysql_install_db --user=mysql"
On Sunday 04 April 2004 18:29, Anders Johansson wrote:
This is because you ran the mysql script manually as root first. This screws up ownership and permissions.
If you don't have any data there, the simplest is to start over completely with "rm -rf /var/lib/mysql/mysql" and let it get regenerated with "rcmysql start"
I uninstaled MySQL using YasT, deleted the /var/lib/mysql directory and then re-installed using YasT. I then ran /etc/init.d/mysql start from a console under my account but this does not seem to work either ... frederic@SusiX:~> /etc/init.d/mysql start Creating MySQL privilege database and starting MySQL... mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied chmod: failed to get attributes of `/var/lib/mysql/mysql': No such file or directory mkdir: cannot create directory `/var/lib/mysql/test': Permission denied chmod: failed to get attributes of `/var/lib/mysql/test': No such file or directory Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables ERROR: 1049 Unknown database 'mysql' 040404 20:38:34 Aborting 040404 20:38:34 /usr/sbin/mysqld: Shutdown Complete Installation of grant tables failed! Examine the logs in /var/lib/mysql for more information. You can also try to start the mysqld daemon with: /usr/sbin/mysqld --skip-grant & You can use the command line tool /usr/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in /var/lib/mysql that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the /usr/bin/mysqlbug script! chmod: changing permissions of `/var/lib/mysql': Operation not permitted failed
Otherwise, do "chown -R mysql.daemon /var/lib/mysql" and "mysql_install_db --user=mysql"
tried that as well ... SusiX:/var/lib # ls -l total 7 ... drwxr-xr-x 2 mysql daemon 48 2003-10-02 22:20 mysql ... frederic@SusiX:~> mysql_install_db --user=mysql mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied chmod: failed to get attributes of `/var/lib/mysql/mysql': No such file or directory mkdir: cannot create directory `/var/lib/mysql/test': Permission denied chmod: failed to get attributes of `/var/lib/mysql/test': No such file o r directory Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables ERROR: 1049 Unknown database 'mysql' 040404 21:04:05 Aborting 040404 21:04:05 /usr/sbin/mysqld: Shutdown Complete Installation of grant tables failed! Examine the logs in /var/lib/mysql for more information. You can also try to start the mysqld daemon with: /usr/sbin/mysqld --skip-grant & You can use the command line tool /usr/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in /var/lib/mysql that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install _db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the /usr/bin/mysqlbug script! I further tried as suggested by the last output : frederic@SusiX:~> /usr/sbin/mysqld --skip-grant & [1] 4754 frederic@SusiX:~> 040404 21:10:30 Can't start server : Bind on unix socket: Permission denied 040404 21:10:30 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? 040404 21:10:30 Aborting 040404 21:10:30 /usr/sbin/mysqld: Shutdown Complete [1]+ Exit 1 /usr/sbin/mysqld --skip-grant However : frederic@SusiX:~> ps -A | grep mysql frederic@SusiX:~> something else maybe ? Kind regards, Frederic
On Sunday 04 April 2004 21.30, Frederic Durodie wrote:
On Sunday 04 April 2004 18:29, Anders Johansson wrote:
This is because you ran the mysql script manually as root first. This screws up ownership and permissions.
If you don't have any data there, the simplest is to start over completely with "rm -rf /var/lib/mysql/mysql" and let it get regenerated with "rcmysql start"
I uninstaled MySQL using YasT, deleted the /var/lib/mysql directory and then re-installed using YasT. I then ran /etc/init.d/mysql start from a console under my account but this does not seem to work either ...
No, you're supposed to run "rcmysql start" as root. That init script will then take care of setting the proper permissions on everything
On Sunday 04 April 2004 21:55, Anders Johansson wrote:
No, you're supposed to run "rcmysql start" as root. That init script will then take care of setting the proper permissions on everything
OK, this seems to work now. I had a doubt when I rebooted this morning and started the mysql server which reported 'failed' but without anyother long error messages. Despite this the mysql server seems to work. Just one last question : how do I have the server start at boot time ? Thanks for all the great help so far ! Kind regards, Frederic
On Monday 05 April 2004 09.00, Frederic Durodie wrote:
Just one last question : how do I have the server start at boot time ?
run "insserv mysql" or in a GUI, start yast, go to System->runlevel editor, and set it to start in the runlevel you use
I think something has happened to my SuSE 9.0 installation as I can no longer get yast to use the cdrom as source of installation. In "hardware / CD-ROM drives" I have added the cdrom, but when adding the drive, in software/Change source of installation it adds it with name cd:/// and url: cd:///. When running "install and remove software" I can only see already installed software, not all the software. If I mount the cdrom manually and adds the /dev/cdrom in "Software Source Media", I can see and install all software on the media. But how do I get it to work properly ? I have moved my harddisk with 9.0 to another machine, and the problem is the same, so it's not the hardware that fails. Any suggestions Bo
participants (3)
-
Anders Johansson
-
Bo Jacobsen
-
Frederic Durodie