In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the linux system installation mysql tutorial, I hope you can supplement and update some knowledge, if you have other questions to understand, you can continue to follow my updated article in the industry information.
This article will introduce how to install the mysql database on the Linux system. I hope it will be helpful to you.
Recommended course: MySQL tutorial.
Download the mysql-compiled binary installation package from the mysql official website. On the download page Select Platform: select linux-generic, then pull to the bottom of the page. Download Linux-Generic (glibc 2.5) (x86, 64-bit) for 64-bit systems and Linux-Generic (glibc 2.5) (x86, 32-bit) for 32-bit systems.
Extract the 32-bit installation package:
Enter the directory where the installation package is located and execute the command: tar mysql-5.6.17-linux-glibc2.5-i686.tar.gz
Copy the extracted mysql directory to the system's local software directory:
Execute the command: cp mysql-5.6.17-linux-glibc2.5-i686 / usr/local/mysql-r
Note: do not add / at the end of the directory
Add system mysql groups and mysql users:
Execute commands: groupadd mysql and useradd-r-g mysql mysql
Install the database:
Enter the directory to install the mysql software: execute the command cd / usr/local/mysql
Change the current directory owner to mysql user: execute the command chown-R mysql:mysql. /
Install the database: execute the command. / scripts/mysql_install_db-- user=mysql
Change the current directory owner to root user: execute the command chown-R root:root. /
Change the current data directory owner to mysql user: execute the command chown-R mysql:mysql data
Installation of this database is complete
Start the mysql service and add boot startup mysql service:
Add boot boot: execute the command cp support-files/mysql.server / etc/init.d/mysql, and put the startup script in the boot initialization directory
Start the mysql service: execute the command service mysql start
Execute command: ps-ef | when grep mysql sees the mysql service, it indicates that it started successfully, as shown in the figure.
Modify the root user password of mysql. The initial root password is empty:
Execute the command:. / bin/mysqladmin-u root password 'password'
Put the mysql client in the default path:
Ln-s / usr/local/mysql/bin/mysql / usr/local/bin/mysql
Note: it is recommended to use soft chain, do not directly package file copy, to facilitate the system to install multiple versions of mysql
More detailed content above address: http://jingyan.baidu.com/article/a378c9609eb652b3282830fd.html
Pay attention to the problems:
I feel that this series of versions of mysql 5.7 are very abnormal, whether it is windows or Linux, there are always some inexplicable ideas during installation. When I installed mysql under windows, I was young and ignorant of version 5.7. as a result, there were all kinds of elusive bug, and I couldn't find it on the Internet. finally, I found that a fellow sufferer complained that it was a version problem, so I just pretended to be 5.6. But this time installed linux, young and frivolous, I forgot the lesson under windows, installed 5.7. as a result, all kinds of bug appeared all the time. Hey, I'm still too young. I hope you can learn your lesson.
9. Use after installation
After installation, you can type mysql-uroot-p, and then enter password to enter mysql.
When you go in, you can use the various syntax of mysql. You can check database:show databases first.
These are the details of how to install mysql under linux, please pay attention to other related articles!
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.