In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following is about the detailed methods of connecting to MySQL5.6 and disconnecting mysql. The secret of the text is to be close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on the detailed methods of connecting and disconnecting MySQL5.6.
3.1 Connecting to and Disconnecting from the Server
3.1 Connect and disconnect from the CVM
To connect to the server, you will usually need to provide a MySQL user name when you invoke mysql and, most likely, a password. If the server runs on a machine other than the one where you log in, you will also need to specify a host name. Contact your administrator to find out what connection parameters you should use to connect (that is, what host, user name, and password to use). Once you know the proper parameters, you should be able to connect like this:
In order to connect to the service, you usually need to provide a MySQL user name and possibly a password. If the service is not running on the fu wu qish CVM where you are logged in, you also need to specify the hostname (or IP address) of the CVM. Contact your administrator to find out which connection parameters you should use to connect (that is, the hostname, user name, and password to use). Once you know the correct parameters, you should be able to connect like this:
Shell > mysql-h host-u user-pEnter password: *
Host and user represent the host name where your MySQL server is running and the user name of your MySQL account. Substitute appropriate values for your setup. The * represents your password; enter it when mysql displays the Enter password: prompt.
If that works, you should see some introductory information followed by a mysql > prompt:
Host and user symbolize the hostname of the MySQL CVM and the user name of the MySQL account. Replace your settings with the appropriate values. * represents your password; enter it when mysql displays Enter password: prompt.
If the configuration is correct, you should see some introductory information, followed by a mysql > prompt:
Shell > mysql-h host-u user-pEnter password: * Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 25338 to server version: 5.6.38-standardType 'help;' or'\ h' for help. Type'\ c'to clear the buffer.mysql >
The mysql > prompt tells you that mysql is ready for you to enter SQL statements.
If you are logging in on the same machine that MySQL is running on, you can omit the host, and simply use the following:
The mysql > prompt tells you that MySQL is ready for you to enter a SQL statement.
If the CVM running by MySQL is the same as the device you logged in, you can omit the hostname setting by using the following command:
Shell > mysql-u user-p
If, when you attempt to log in, you get an error message such as ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ tmp/mysql.sock' (2), it means that the MySQL server daemon (Unix) or service (Windows) is not running. Consult the administrator or see the section of Chapter 2, Installing and Upgrading MySQL that is appropriate to your operating system.
For help with other problems often encountered when trying to log in, see Section B.5.2, "Common Errors When Using MySQL Programs".
Some MySQL installations permit users to connect as the anonymous (unnamed) user to the server running on the local host. If this is the case on your machine, you should be able to connect to that server by invoking mysqlwithout any options:
If you receive an error message (such as ERROR 2002 (HY000)) when you try to log in, you cannot connect to the local MySQL CVM via socket'/ tmp/mysql.sock' (2), which means that the MySQL CVM daemon (Unix) or service (Windows) is not running. Consult your administrator or refer to the installation and upgrade MySQL section of Chapter 2 for your operating system.
For help on other problems you often encounter when trying to log in, see Section B.5.2, "Common errors when using the MySQL program."
Some MySQL installations allow users to connect to a cloud server running on a local host as an anonymous (unnamed) user. If this is the case with your machine, you should be able to connect to the CVM by calling mysql without any options:
Shell > mysql
After you have connected successfully, you can disconnect any time by typing QUIT (or\ Q) at the mysql > prompt:
After the connection is successful, you can disconnect mysql by typing QUIT (or\ Q) at the prompt:
Mysql > QUITBye
On Unix, you can also disconnect by pressing Control+D.
Most examples in the following sections assume that you are connected to the server. They indicate this by themysql > prompt.
On Unix, you can also disconnect by pressing Control + D.
Most of the examples in the following sections assume that you are connected to the cloud server. They indicate this through the mysql > prompt.
Is there anything you don't understand about the detailed methods of connecting to MySQL5.6 and disconnecting mysql? Or if you want to know more about it, you can continue to follow our industry information section.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.