91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Linux Centos7安裝MySQL5.5(二進制方式安裝)

發布時間:2020-06-06 14:32:09 來源:網絡 閱讀:8191 作者:Qiu_CJ 欄目:MySQL數據庫

Linux Centos7安裝MySQL5.5(二進制方式安裝)

一、在/app目錄下下載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

二、解壓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

三、將解壓后的mysql-5.5.54-linux2.6-x86_64改名為mysql

[root@test app]# mv mysql-5.5.54-linux2.6-x86_64 mysql

四、添加/etc/my.cnf文件

[root@test app]# cd /app/mysql/support-files/
[root@test support-files]# cp -f my-small.cnf /etc/my.cnf

五、創建mysql目錄下的data目錄

[root@test support-files]# mkdir -p /app/mysql/data/

六、將mysql的所屬用戶改為mysql

[root@test support-files]# chown -R mysql.mysql /app/mysql/

七、增加/etc/init.d/mysqld,并為之賦予執行權限,然后初始化MySQL

[root@test support-files]# cp -f mysql.server /etc/init.d/mysqld
[root@test support-files]# chmod +x /etc/init.d/mysqld

【初始化MySQL】

[root@test support-files]# /app/mysql/scripts/mysql_install_db --basedir=/app/mysql --datadir=/app/mysql/data --user=mysql

八、將 /application/mysql/bin/mysqld_safe和/etc/init.d/mysqld中的/usr/local/mysql改為/app/mysq

[root@test support-files]# sed -i 's#/usr/local/mysql#/app/mysql#g' /app/mysql/bin/mysqld_safe /etc/init.d/mysqld

九、啟動mysql

[root@test support-files]# /etc/init.d/mysqld start
Starting MySQL.Logging to '/app/mysql/data/test.err'.
.. SUCCESS! 

十、檢查mysql是否啟動

[root@test support-files]# netstat -lntup | grep mysql
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      5478/mysqld 

十一、設置環境變量

[root@test support-files]# echo 'export PATH=/app/mysql/bin:$PATH' >>/etc/profile
[root@test support-files]# source /etc/profile

十二、進入mysql

[root@test support-files]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server 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 its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

十三、修改root密碼

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');

十四、退出MySQL,使用用戶名和密碼再次登錄MySQL

mysql> Ctrl-C -- exit!
Aborted
[root@test support-files]# mysql -uroot -p
Enter password: 

十五、創建數據庫和表(指定utf-8編碼格式)

mysql> create database userInfo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> use userInfo;
Database changed

mysql> 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)

十六、導入sql文件(若需要執行此步驟)

mysql> source /app/cloud_note.sql
mysql> show databases;
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

舟山市| 祁阳县| 安龙县| 陆丰市| 雷山县| 湛江市| 淅川县| 曲阜市| 高青县| 宿迁市| 河北区| 县级市| 驻马店市| 九台市| 五大连池市| 江西省| 安泽县| 永德县| 赣榆县| 祥云县| 彩票| 永顺县| 宝鸡市| 灵丘县| 武穴市| 黄平县| 玛曲县| 灵石县| 东丰县| 宿迁市| 泰兴市| 文安县| 永安市| 抚顺市| 忻州市| 房山区| 达州市| 营山县| 清丰县| 萝北县| 古浪县|