User Tools

Site Tools


db:mystarterr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

db:mystarterr [2013/03/16 17:40] (current)
Line 1: Line 1:
 +==== How to deal with Mysql server if it ends right after start ====
 +16.10.2009
  
 +
 +If you try to startup mysqld after a fresh install, and it ends right after it, check first if you ran the db installation script:
 +
 +<​code>​
 +# mysql_install_db
 +</​code>​
 +
 +This should install the required database.
 +If you want to fire it up then and you get something like this:
 +
 +<​code>​
 +Starting mysqld daemon with databases from /​var/​lib/​mysql
 +STOPPING server from pid file /​var/​lib/​mysql/​myhost.pid
 +091016 18:​52:​03 ​ mysqld ended
 +</​code>​
 +
 +check if **/​var/​lib/​mysql** if owned by the user under mysqld runs (usually** mysql** user).
 +
 +<​code>​
 +cd /var/lib
 +chown -R mysql:mysql mysql/
 +</​code>​
 +
 +Now, you should be able to start the daemon **mysqld_safe &**
 +
 +Right after that, you need to **setup a mysql root password**. I suggest to do it from within mysql:
 +
 +<​code>​
 +# mysql
 +Welcome to the MySQL monitor. ​ Commands end with ; or \g.
 +Your MySQL connection id is 1
 +Server version: 5.0.84-log Source distribution
 +
 +...
 +mysql> USE mysql
 +Database changed
 +mysql> UPDATE user SET password=PASSWORD("​yourgreatpassword"​) WHERE User='​root';​
 +Query OK, 3 rows affected (0.00 sec)
 +Rows matched: 3  Changed: 3  Warnings: 0
 +mysql> FLUSH PRIVILEGES;
 +Query OK, 0 rows affected (0.00 sec)
 +</​code>​
db/mystarterr.txt ยท Last modified: 2013/03/16 17:40 (external edit)