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 > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the complete installation tutorial of mysql under linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the complete installation tutorial of mysql under linux.
1. Set up the corresponding directory and user group mkdir / usr/local/mysql groupadd mysql useradd-g mysql-d / usr/local/mysql
two。 Start installing mysql tar-xzxv mysql-5.0.19.tar.gz cd mysql-5.0.19. / configure-- prefix=/usr/local/mysql (specify installation directory)-- without-debug removes debug mode-- with-extra-charsets=gb2312 adds gb2312 Chinese character support-- enable-assembler uses the assembly version of some character functions-- without-isam removes isam table type support. Isam table is now rarely used. Platform-dependent tables-without-innodb without innodb tables support innodb is a table that supports transaction processing Suitable for enterprise applications-- with-pthread forces the use of the pthread library (POSIX thread library)-- enable-thread-safe-client compiles the client in a threaded manner-- with-client-ldflags=-all-static-- with-mysqld-ldflags=-all-static compiles server and client statically-- with- raid activates raid support
Make & & make install
3. Set up databases and tables
. / usr/local/mysql/bin/mysql_install_db-- user=mysql
Copy configuration file, there are three large,medium,small environments, according to the machine performance choice, if the load is relatively large, you can modify the memory usage values of some variables inside.
Cp / usr/local/mysql/share/mysql/my-medium.cnf / etc/my.cnf
Change directory permissions and groups
Chmod 755-R / usr/local/mysql/
Chown mysql.mysql-R / usr/local/mysql/
Start mysql
/ usr/local/mysql5/bin/mysqld_safe &
Set up startup service
Cp / usr/local/mysql/share/mysql/mysql.server / etc/init.d/mysqld
Chkconfig-add mysqld
Chkdonfig-level 345 mysql on
Change the password of the login user
/ usr/local/mysql5/bin/mysqladmin-u root password "root"
Log in to mysql database
/ usr/local/mysql5/bin/mysql-u root-p
Enter password: root
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 18 to server version: 5.0.19-log
Type 'help;' or' h' for help. Type 'c'to clear the buffer.
Mysql > use mysql
Mysql > delete from user where password= ""; # Delete an empty password account for local anonymous connections
Mysql > flush privileges
Mysql > quit
At this point, I believe you have a deeper understanding of the "complete installation tutorial of mysql under linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.