I'm trying to connect to a mysql server over a local network. The server is running and listening to post 41322.
dylan~$ netstat -ln | s mysql
unix 2 [ ACC ] STREAM LISTENING 41322 /var/run/mysqld/mysqld.sock
My user is granted all rights from all addresses, and I can log in locally.
dylan~$ mysqladmin -P 41322 -h dylan@10.0.0.10 create database test
mysqladmin: connect to server at 'dylan@10.0.0.10' failed
error: 'Unknown MySQL server host 'dylan@10.0.0.10' (1)'
Check that mysqld is running on dylan@10.0.0.10 and that the port is 41322.
You can check this by doing 'telnet dylan@10.0.0.10 41322'
Adding a --verbose flag gives no additional output. I've commented out bind-address=127.0.0.1 in /etc/mysql/my.cnf on the server. I can ssh into the server without a problem.
dylan~$ ps a | grep mysql
11131 pts/3 S 0:00 /bin/sh /usr/bin/mysqld_safe
11170 pts/3 Sl 0:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
11171 pts/3 S 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
13710 pts/1 S+ 0:00 grep mysq
Any help or thoughts are appreciated.
user@hostsyntax is valid. Try-h host -u user -p pass– fab Mar 19 '11 at 20:40netstatline indicates that mysql is listening on aunixsocket (pipe), not a TCP socket.41322is an inode number in that case, not a TCP port. – Mat Mar 19 '11 at 20:55