In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Download the installation package mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz
Create a mysql user
Useradd-r mysql-s / sbin/nologin
Extract the file
Tar-zxvf mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz-C / opt/
Rename
Mv / opt/mysql-5.6.38-linux-glibc2.12-x86_64/ / opt/mysql-5.6
Create a data directory
Mkdir / data
Change directory attribute group
Chown-R mysql.mysql / datachown-R mysql.mysql / opt/mysql-5.6/
Install mysql
Cd / opt/mysql-5.6/scripts/. / mysql_install_db-- basedir=/opt/mysql-5.6/-- datadir=/data-- user=mysql-- pid-file=/opt/mysql-5.6/mysql.pid
Installation mysql reports an error
FATAL ERROR: please install the following Perl modules before executing
Missing autoconf package
Yum-y install autoconf
Error while loading shared libraries: libaio.so.1:
Missing libaio-devel package
Yum-y install libaio-devel
Add startup script
Cp / opt/mysql-5.6/support-files/mysql.server / etc/init.d/mysqld
Modify the configuration file
Vi / etc/my.cnf [mysqld] basedir = / opt/mysql-5.6 datadir = / data socket = / tmp/mysql.sock pid-file = / opt/mysql-5.6/mysql.pid log-bin=mysql-bin binlog_format=mixed character-set-server = utf8 max_connections = 3000 default_storage_engine = InnoDB innodb_file_per_table = 1 innodb_open_files = 500 innodb_buffer_pool_size = 64m innodb_write_io_threads = 4 innodb_read_io_threads = 4 innodb_ Thread_concurrency = 0 innodb_purge_threads = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 2m innodb_log_file_size = 32m innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 interactive_timeout = 28800 wait_timeout = 28800 lower_case_table_names=1 event_scheduler=1 skip-name-resolve=1 [mysqldump] quick max_allowed_packet = 32m
Start mysql
/ etc/init.d/mysqld start
Modify root password
Cd / opt/mysql-5.6./bin/mysqladmin-u root password '123'
Log in to mysql
Cd / opt/mysql-5.6./bin/mysql-uroot-pendant 123'
Delete empty user and empty password
Delete from mysql.user where user='';delete from mysql.db where user=''
Error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ tmp/mysql.sock' (2)
Find the mysql.sock file and make a soft connection
Ln-s / opt/mysql-5.6/mysql.sock / tmp/mysql.sock
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.