In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Linux Centos7 installation MySQL5.5 (binary installation) 1. Download mysql-5.5.54-linux2.6-x86_ 64.tar.gz` [root @ test /] # cd / app [root@test app] # wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.54-linux2.6-x86_64.tar.gz II in / app directory. Extract mysql-5.5.54-linux2.6-x86_64.tar.gz.
[root@test app] # ta zvxf mysql-5.5.54-linux2.6-x86_64.tar.gz
3. Rename the decompressed mysql-5.5.54-linux2.6-x86_64 to mysql
[root@test app] # mv mysql-5.5.54-linux2.6-x86_64 mysql
Add the / etc/my.cnf file [root@test app] # cd / app/mysql/support-files/ [root@test support-files] # cp-f my-small.cnf / etc/ my.cnf V, create the data directory under the mysql directory [root@test support-files] # mkdir-p / app/mysql/data/ VI, change the user of mysql to mysql [root@test support-files] # chown-R mysql.mysql / app/mysql/ VII, add / etc/init.d/mysqld Give it execution permission, and then initialize MySQL [root@test support-files] # cp-f mysql.server / etc/init.d/mysqld [root@test support-files] # chmod + x / etc/init.d/mysqld
[initialize MySQL]
[root@test support-files] # / app/mysql/scripts/mysql_install_db-- basedir=/app/mysql-- datadir=/app/mysql/data-- user= mysql8, change the / usr/local/mysql in / application/mysql/bin/mysqld_safe and / etc/init.d/mysqld to / app/mysq [root@test support-files] # sed-I's sign the MySQL password Start MySQL [root @ test support-files] # / etc/init.d/mysqld startStarting MySQL.Logging to'/ app/mysql/data/test.err'... SUCCESS! 10. Check whether mysql launches [root@test support-files] # netstat-lntup | grep mysqltcp 000.0.0.0netstat 3306 0.0.0.0netstat * LISTEN 5478/mysqld 11, set the environment variable [root@test support-files] # echo 'export PATH=/app/mysql/bin:$PATH' > > / etc/profile [root@test support-files] # source / etc/profile 12, Enter MySQL [root @ test support-files] # mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 1Server version: 5.5.54 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql > XIII. Change the root password mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' newpass'); 14. Log in to MySQLmysql > Ctrl-C-- exited aborted [root@test support-files] # mysql-uroot-pEnter password: XIV. Log out of MySQL and log in with your username and password again. Create database and table (specify utf-8 encoding format) mysql > create database userInfo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci Query OK, 1 row affected (0.00 sec) mysql > use userInfo;Database changedmysql > create table test (- > name varchar (10) not null,-> address varchar (100) default null)-> ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;Query OK, 0 rows affected (0.06 sec) 16. Import sql file (if you need to do this step) mysql > source / app/cloud_note.sqlmysql > show databases
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.