View previous topic :: View next topic |
Author |
Message |
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Tue Jan 09, 2007 9:15 pm Post subject: Setup mysql virtual hosting |
|
|
I have set up two instances of mysql more or less as explained in the "HOWTO Setup Mysql virtual hosting" (Gentoo Wiki).
Mysqlmanager starts fine, the two instances are online and the necessary pid and sock files are created in /var/run.
However, the sock files created in /var/run are not usable to access the database.
Any idea on what may be the problem?
The sequence of events showing the problem:
Quote: | localhost ~ # /etc/init.d/mysqlmanager stop
* ...
* Stopping mysqlmanager (0) [ ok ]
localhost ~ # ls -al /var/run/mysqld/
total 8
drwxr-xr-x 2 mysql mysql 4096 Jan 9 22:12 .
drwxr-xr-x 3 root root 4096 Jan 9 22:12 ..
srwxrwxrwx 1 mysql mysql 0 Jan 8 21:32 mysqld30119.sock
srwxrwxrwx 1 mysql mysql 0 Jan 8 21:33 mysqld5153.sock
localhost ~ # /etc/init.d/mysqlmanager start
* ...
* working on 0
* Starting mysqlmanager0 (/etc/mysql/my.cnf) [ ok ]
localhost ~ # ls -al /var/run/mysqld/
total 20
drwxr-xr-x 2 mysql mysql 4096 Jan 9 22:12 .
drwxr-xr-x 3 root root 4096 Jan 9 22:12 ..
-rw-rw---- 1 root root 5 Jan 9 22:12 manager.pid
srwxrwxrwx 1 root root 0 Jan 9 22:12 manager.sock
srwxrwxrwx 1 mysql mysql 0 Jan 8 21:32 mysqld30119.sock
srwxrwxrwx 1 mysql mysql 0 Jan 8 21:33 mysqld5153.sock
-rw-rw---- 1 mysql mysql 5 Jan 9 22:12 mysqld_localhost.pid
srwxrwxrwx 1 mysql mysql 0 Jan 9 22:12 mysqld_localhost.sock
-rw-rw---- 1 mysql mysql 5 Jan 9 22:12 mysqld_staxmax.pid
srwxrwxrwx 1 mysql mysql 0 Jan 9 22:12 mysqld_staxmax.sock
localhost ~ # mysql -h 127.0.0.1 -P 1999 -u sqluser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 0.2-alpha
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show instances
-> ;
+---------------+--------+
| instance_name | status |
+---------------+--------+
| mysqld1 | online |
| mysqld2 | online |
+---------------+--------+
2 rows in set (0.00 sec)
mysql> quit
Bye
localhost ~ # mysql --socket=/var/run/mysqld/mysql_staxmax.sock -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql_staxmax.sock' (2)
localhost ~ #
|
I have written down all passwords and I am (almost) sure that it is not a password problem (anyhow, mysql would in such case give another errormessage). |
|
Back to top |
|
|
Dan Veteran
Joined: 25 Oct 2005 Posts: 1302
|
Posted: Tue Jan 09, 2007 10:08 pm Post subject: |
|
|
try
Code: | mysql --protocol=socket --socket=/var/run/mysqld/mysql_staxmax.sock -u root -p |
_________________ - Failure is not an option. It's bundled with your software. |
|
Back to top |
|
|
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Wed Jan 10, 2007 5:20 am Post subject: try with --protocol=socket |
|
|
Thanks for the suggestion.
But the result remains exactly the same.
Too bad. |
|
Back to top |
|
|
meez n00b
Joined: 25 Jul 2004 Posts: 33
|
Posted: Fri Feb 27, 2009 1:27 am Post subject: Mysqlmanager |
|
|
Hi,
I have an other interesting Problem. I con connect via socket, but via Port can connect to 3307,3308,3309 but I allways enter only instance 0. Via socket I can enter them all?
Port is configurated und my.conf like in docu.
Any ideas?
Greetings,
Martin |
|
Back to top |
|
|
|