In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the installation of mysql database on the Linux operating system and the problems that are easy to occur". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. please follow the editor's train of thought to study and learn "the installation of mysql database on the Linux operating system and the problems that are easy to occur".
1. The test environment is as follows:
1 、 VmwareWorkStation:6.0.2 build-59824
2. Version of Mysql database:
Server side: MySQL-server-5.5.19-1.linux2.6.i386.rpm
Client: MySQL-client-5.5.19-1.linux2.6.i386.rpm
3. Required plug-in package: libaio-0.3.105-2.i386.rpm
4. Version: RedHat Linux AS 4
2. Perform installation
1. [root@ssbsc mysql] # rpm-ivh libaio-0.3.105-2.i386.rpm
2. [root@ssbsc mysql] # rpm-ivh MySQL-server-5.5.19-1.linux2.6.i386.rpm
3. [root@ssbsc mysql] # rpm-ivh MySQL-client-5.5.19-1.linux2.6.i386.rpm
III. Verification
Use the netstat-nat command to verify that mysql has been started.
[root@ssbsc] # netstat-nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
Tcp 0 0: 3306: * LISTEN
It is observed that port 3306 of Local Address has been enabled, which means the service has been started. If it is not started, you can use the following command to enable it:
[root@ssbsc mysql] # service mysql start
Starting MySQL.. [OK]
4. Log in to MySQL
The command to log in to MySQL is mysql,mysql. The syntax is as follows:
Mysql [- u username] [- h host] [- p [password]] [dbname]
Username and password are the user name and password of MySQL, respectively. The initial administrative account of mysql is root, and there is no password. I set the password here, so I log in with a password.
[root@ssbsc mysql] # mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 2
Server version: 5.5.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
If the mysql > shown above appears, it proves that you have successfully logged in.
Use Navicat for MySQL to log in to the My just installed on the Linux system on the Windows operating system
The problems that you usually encounter:
Error1: 2003:Can't connect to MySQL server on 'localhost'
Solution: turn off the firewall function of Linux, or set to allow port 3306 of TCP protocol to pass through, you can use the following command to open port 3306 of TCP protocol
[root@bugzilla ~] # more / etc/sysconfig/iptables
-A RH-Firewall-1-INPUT-p tcp-- dport 3306-j ACCEPT
Error2: 1130-Host'ClientIP' is not allowed to connect to this MySQL server
Solution: use root users to log in to Linux, log in to root users in MySQL, and change the range of IP addresses allowed to log in.
[root@bugzilla] # mysql-u root-p
Mysql > grant all privileges on *. * to 'root'@'%' identified by' your password' with grant option
This instruction allows all root users to enter a password to log in to the mysql server. If you replace'% 'with' 192.168.1.208', only the host '192.168.1.208' can log in.
Thank you for reading, the above is the content of "the installation of mysql database on the Linux operating system and the problems that are easy to occur". After the study of this article, I believe you have a deeper understanding of the installation of mysql database on the Linux operating system and the problems that are easy to appear, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.