This forum is no longer active. Please post your questions to our new community site

Not start mysql (cp insatalldir to another machine)

Subscribe to Not start mysql (cp insatalldir to another machine) 5 post(s), 2 voice(s)

 
Avatar diimdeep 13 post(s)

Hello. I’m make a full backup by wiki and untar in same directory on another machine (Ubuntu 11.04 → Ubuntu 11.04)

But mysql not started

please help !

$ cd installdir
$ sudo ./rubyconsole
$ ./ctlscript.sh stop

new terminal window
$ cd /home/user/Downloads/
$ sudo tar -czvf rubystack.tar.gz /opt/rubystack-2.2-0/

on another machine
$ cd /home/user/Downloads/
$ sudo tar xzvf rubystack.tar.gz /opt/

UPDATE:

user@user-10:/opt/rubystack-2.2-0$ sudo ./rubyconsole
[sudo] password for user:
bash-4.1# ./ctlscript.sh start
110627 12:25:13 mysqld_safe Logging to ‘/opt/rubystack-2.2-0/mysql/data/mysqld.log’.
chown: invalid user: `mysql’
110627 12:25:13 mysqld_safe Starting mysqld.bin daemon with databases from /opt/rubystack-2.2-0/mysql/data
110627 12:25:13 mysqld_safe mysqld from pid file /opt/rubystack-2.2-0/mysql/data/user-10.pid ended
/opt/rubystack-2.2-0/mysql/scripts/ctl.sh : mysql could not be started
/opt/rubystack-2.2-0/memcached/scripts/ctl.sh : Memcached started
starting port 3001
starting port 3002
Syntax OK
/opt/rubystack-2.2-0/apache2/scripts/ctl.sh : httpd started at port 80
/opt/rubystack-2.2-0/subversion/scripts/ctl.sh : subversion started at port 3690
bash-4.1#

mysqld.log:
0627 12:25:13 mysqld_safe Starting mysqld.bin daemon with databases from /opt/rubystack-2.2-0/mysql/data
110627 12:25:13 [ERROR] Fatal error: Can’t change to run as user ‘mysql’ ; Please check that the user exists!

110627 12:25:13 [ERROR] Aborting

110627 12:25:13 [Note] /opt/rubystack-2.2-0/mysql/bin/mysqld.bin: Shutdown complete

110627 12:25:13 mysqld_safe mysqld from pid file /opt/rubystack-2.2-0/mysql/data/user-10.pid ended

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Does the mysql user exists in the machine? Try to create this user and try to start the database again.

 
Avatar diimdeep 13 post(s)

Don’t know how. Please help !

 
Avatar diimdeep 13 post(s) sudo adduser mysql

it works!

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear that!