Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setup mysql virtual hosting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Tue Jan 09, 2007 9:15 pm    Post subject: Setup mysql virtual hosting Reply with quote

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
View user's profile Send private message
Dan
Veteran
Veteran


Joined: 25 Oct 2005
Posts: 1302

PostPosted: Tue Jan 09, 2007 10:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Wed Jan 10, 2007 5:20 am    Post subject: try with --protocol=socket Reply with quote

Thanks for the suggestion.

But the result remains exactly the same.

Too bad.
Back to top
View user's profile Send private message
meez
n00b
n00b


Joined: 25 Jul 2004
Posts: 33

PostPosted: Fri Feb 27, 2009 1:27 am    Post subject: Mysqlmanager Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum