How to connect from windows command prompt to mysql command line

后端 未结 16 1961
南旧
南旧 2020-12-12 23:30

I\'m trying to connect to mysql server command line from my windows prompt

I write the next line in cmd but i get an error.

cd C:\\MYSQL\\bin\\
         


        
16条回答
  •  甜味超标
    2020-12-13 00:21

    To make it easier to invoke MySQL programs, you can add the path name of the MySQL bin directory to your Windows system PATH environment variable:

    On the Windows desktop, right-click the My Computer icon, and select Properties.

    Next select the Advanced tab from the System Properties menu that appears, and click the Environment Variables button.

    Under System Variables, select Path, and then click the Edit button. The Edit System Variable dialogue should appear.

    Place your cursor at the end of the text appearing in the space marked Variable Value. (Use the End key to ensure that your cursor is positioned at the very end of the text in this space.) Then enter the complete path name of your MySQL bin directory (for example, C:\Program Files\MySQL\MySQL Server 8.0\bin).

    Open a different terminal and if you are using root as user run mysql -u root -p else use the a different username you created.

提交回复
热议问题