Access mysql remote database from command line

后端 未结 17 1552
忘掉有多难
忘掉有多难 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:07

    This one worked for me in mysql 8, replace hostname with your hostname and port_number with your port_number, you can also change your mysql_user if he is not root

          mysql --host=host_name --port=port_number -u root -p
    

    Further Information Here

提交回复
热议问题