Access mysql remote database from command line

后端 未结 17 1556
忘掉有多难
忘掉有多难 2020-11-28 01:41

I have a server with Rackspace. I want to access the database from my local machine command line.

I tried like:

mysql -u username -h my.application.com         


        
17条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 02:13

    1. try telnet 3306. If it doesn't open connection, either there is a firewall setting or the server isn't listening (or doesn't work).

    2. run netstat -an on server to see if server is up.

    3. It's possible that you don't allow remote connections.

      See http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

提交回复
热议问题