In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First, extract the file to the current directory
Command: tar-zxvf mysql....tar.gz
2. Move the decompressed folder to the target directory and rename it mysql
Command: mv mysql- version number / usr/local/mysql
Add system mysql groups and mysql users
Add a system mysql group
Sudo groupadd mysql
Add mysql user
Sudo useradd-r-g mysql mysql
After the addition is completed, you can view it with id mysql
Then go to the / usr/local/mysql directory
Set the permissions for mysql user groups to operate on this folder
Command: chown-R mysql:mysql. /
Check to see if / etc/my.cnf exists. If so, delete it.
View commands: ls / etc/my.cnf
Delete command: rm / etc/my.cnf
Initialize the database
Command:. / scripts/mysql_install_db-- user=mysql
Note: if you execute this command, the following error is reported
Yumpackage needs to be installed
Command: yum-y install perl perl-devel
Installation is complete and re-execute the initialization database command
Then go to the support-files folder
Copy my-default.cnf to / etc and rename it to my.cnf
Command: cp my-default.cnf / etc/my.cnf
Copy the startup file mysql.server to / etc/rc.d/init.d and rename it to mysql
Command: cp mysql.server / etc/rc.d/init.d/mysql
Then configure mysql to boot automatically
Enter the / etc/init.d directory
Assign executable permissions to mysql
Command: chmod + x mysql
Add Servic
Command: chkconfig-- add mysql
View a list of services
Command: chkconfig-- list
If you see the service of mysql, and if all of them are on, then you will succeed. If it is off, type
Chkconfig-level 345 mysql on
Restart the computer
Check monitoring to see if the service is started
Command: netstat-na | grep 3306
Change users can manipulate the database remotely
Authorized operation
Command: grant all privileges on *. * to'%'@'% 'identified by' mypassword' with grant option
Refresh authorization
Flush privileges
Remote connection
Delete other users
Summary
The above is the installation and configuration of the decompressed MySQL database under the linux system, which is introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
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
Oracle Study-OCR disk failure (PROT-602) under AIX RAC *
© 2024 shulou.com SLNews company. All rights reserved.