My sysadmin patches my Mac server, and suddenly MySQL is pointing at a version 5 install. Prior to this, it was pointing to a version 4 install. My data is stranded in the version 4. Somehow whenever I run the mysql command I end up in the version 5. I need to do a mysqldump of the version 4 stuff to put it in v5. I'm not sure how to:
stop the v5. start the v4. (then mysqldump) stop the v4. start the v5.
Here's how I know about both:
xxx:/usr/bin lynn$ /usr/bin/mysql --version /usr/bin/mysql Ver 14.7 Distrib 4.1.22, for apple-darwin8.0 (powerpc) using EditLine wrapper
xxx:/usr/bin lynn$ /usr/local/mysql --version -bash: /usr/local/mysql: is a directory
xxx:/usr/bin lynn$ /usr/local/mysql/bin/mysql --version /usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.1.32, for apple-darwin9.5.0 (i386) using readline 5.1
xxx:/usr/bin lynn$ echo $PATH /bin:/sbin:/usr/bin:/usr/sbin
Edit: I do have root access, I just don't know the commands. I tried mysqld_start, but I can't get the instance to start.
xxx:/usr/bin rootuser$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
xxx:/usr/bin rootuser$ mysqld
su: mysqld: command not found
xxx:/usr/bin rootuser$ mysqld_safe &
[1] 1494
xxx:/usr/bin rootuser$ Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/xxx.xxx.xxx.pid
090514 14:27:31 mysqld ended
[1]+ Done mysqld_safe xxx:/usr/bin rootuser$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)