亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

MySQL安裝部署

IT那活兒 / 1220人閱讀
MySQL安裝部署
點(diǎn)擊上方“IT那活兒”公眾號(hào),關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了?。?!
1. 創(chuàng)建mysql用戶
groupadd mysql
useradd -g mysql mysql
2. 部署MySQL軟件
mkdir /data
chown -R mysql:mysql   /data
cd
mv mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz /data/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz

mkdir -p /software/mysql
chown -R mysql:mysql /software
cd /software/mysql
tar zxvf /data/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz
3. 創(chuàng)建軟鏈接
cd /usr/local/
unlink mysql
ln -s /software/mysql-5.7.30-linux-glibc2.12-x86_64 mysql
chown -R mysql:mysql mysql
4. 創(chuàng)建基本目錄
mkdir /data/mysql
mkdir /data/mysql/mysql_3306
cd /data/mysql/mysql_3306/
mkdir data
mkdir logs
mkdir tmp
chown -R mysql:mysql /data/mysql/mysql_3306
5. 創(chuàng)建my.cnf
vi /etc/my.cnf

[client]
port = 3306
socket = /tmp/mysql3306.sock

[mysql]
#prompt="(u:HOSTNAME:)[d]> "
prompt="u@h R:m:s [d]> "
no-auto-rehash

[mysqld]
user = mysql
port = 3306
socket = /tmp/mysql3306.sock
basedir = /usr/local/mysql
datadir = /data/mysql/mysql_3306/data
character-set-server = utf8
back_log = 103
slow_query_log = 1
slow_query_log_file = /data/mysql/mysql_3306/data/slow.log
log-error = /data/mysql/mysql_3306/data/error.log
long_query_time = 0.1
server-id = 813306
log-bin = /data/mysql/mysql_3306/logs/log-bin
sync_binlog = 1
binlog_cache_size = 4M
binlog_format = row
relay_log_recovery = 1

transaction_isolation = REPEATABLE-READ
#innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 5734M
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_data_file_path = ibdata1:1024M;ibdata2:1024M;ibdata3:1024M:autoextend
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 16M
innodb_log_file_size = 2G
innodb_log_files_in_group = 2
innodb_rollback_on_timeout = 1
innodb_print_all_deadlocks = 1
innodb_file_per_table = 1
innodb_locks_unsafe_for_binlog = 0


cd /usr/local/mysql
./bin/mysqld --initialize-insecure
6. 數(shù)據(jù)庫實(shí)例初始化
cd /usr/local/mysql
[root@master01 mysql]# pwd
/usr/local/mysql

[root@master01 mysql]#
[root@master01 mysql]# <+++++++++++++無任何回顯

[root@Mysql01 mysql]# ./bin/mysqld --initialize-insecure
#–initialize-insecure,不需要密碼即可進(jìn)入

[root@Mysql01 mysql]# ./bin/mysqld --initialize
./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
[root@Mysql01 mysql]#
[root@Mysql01 mysql]#

[root@Mysql01 mysql]# yum -y install libaio.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base | 3.6 kB 00:00:00
epel | 5.3 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/2): epel/x86_64/updateinfo | 973 kB 00:00:00
(2/2): epel/x86_64/primary_db | 6.7 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================================================================
Installing:
libaio x86_64 0.3.109-13.el7 base 24 k

Transaction Summary
=================================================================================================================================================================================================================================
Install 1 Package

Total download size: 24 k
Installed size: 38 k
Downloading packages:
libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libaio-0.3.109-13.el7.x86_64 1/1
Verifying : libaio-0.3.109-13.el7.x86_64 1/1

Installed:
libaio.x86_64 0:0.3.109-13.el7

Complete!
[root@Mysql01 mysql]#
[root@Mysql01 mysql]#
[root@Mysql01 mysql]#
7. 創(chuàng)建啟動(dòng)腳本
cd /usr/local/mysql
cp support-files/mysql.server /etc/init.d/mysql
echo "export PATH=$PATH:/usr/local/mysql/bin">>/etc/profile
source /etc/profile



====
[root@master01 ~]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use systemctl list-unit-files.
To see services enabled on particular target use
systemctl list-dependencies [target].
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@master01 ~]# chkconfig --add mysql.server
error reading information on service mysql.server: No such file or directory
[root@master01 ~]#
[root@master01 ~]#
[root@master01 ~]# chkconfig --add mysql
[root@master01 ~]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use systemctl list-unit-files.
To see services enabled on particular target use
systemctl list-dependencies [target].
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@master01 ~]#

=====
8. 啟動(dòng)和關(guān)閉數(shù)據(jù)庫
service mysql start |stop|restart
9. 密碼來自error.log 文件
cat /data/mysql/mysql_3306/data/error.log |grep "password"

2017-11-01T07:31:33.932297Z 1 [Note] A temporary password is generated for root@localhost: XX41vxuK;=!q

mysql -S /tmp/mysql3306.sock -uroot -p
首次登陸需要修改root密碼:
alter user root@localhost identified by abcd1234;
flush privileges;


本文作者:張德橋(上海新炬王翦團(tuán)隊(duì))

本文來源:“IT那活兒”公眾號(hào)

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/129340.html

相關(guān)文章

  • 云服務(wù)器 ECS 建站教程:在ECS上部署數(shù)據(jù)庫

    摘要:在阿里云平臺(tái)上,可通過自帶的鏡像市場(chǎng)實(shí)現(xiàn)一鍵部署系統(tǒng)的數(shù)據(jù)庫,完美解決耗時(shí)長(zhǎng)部署易出錯(cuò)的缺陷。操作步驟登錄云服務(wù)器管理控制臺(tái)。單擊左側(cè)導(dǎo)航中的云服務(wù)器創(chuàng)建實(shí)例。在ECS上部署數(shù)據(jù)庫 數(shù)據(jù)庫是依照某種數(shù)據(jù)模型組織起來并存放二級(jí)存儲(chǔ)器中的數(shù)據(jù)集合。這種數(shù)據(jù)集合具有如下特點(diǎn):盡可能不重復(fù),以最優(yōu)方式為某個(gè)特定組織的多種應(yīng)用服務(wù),其數(shù)據(jù)結(jié)構(gòu)獨(dú)立于使用它的應(yīng)用程序,對(duì)數(shù)據(jù)的增、刪、改和檢索由統(tǒng)一軟件進(jìn)...

    stefan 評(píng)論0 收藏0
  • Ubuntu下部署Django應(yīng)用

    摘要:配置這個(gè)啟動(dòng)其他方式安裝七牛云由于網(wǎng)站的靜態(tài)存儲(chǔ)要用七牛云,在運(yùn)行程序前要安裝否則報(bào)錯(cuò)沒有的方法。七牛云安裝前注意安裝的版本,我被坑過一次,寫程序時(shí)是版本,部署時(shí)都了,接口全都不一樣。還有推薦下這篇來自的部署實(shí)例 以下所有代碼中的操作都需要在命令行運(yùn)行 安裝mysql apt-get update apt-get install mysql-server mysql-client 根據(jù)...

    tinysun1234 評(píng)論0 收藏0
  • windows一鍵部署java項(xiàng)目

    摘要:一的函數(shù),在代碼塊中,可以自定義很多功能來實(shí)現(xiàn)自定義的開發(fā),具體可以參考在線的文檔二需要用腳本配置環(huán)境變量,安裝部署,安裝部署。 windows一鍵部署java項(xiàng)目 因?yàn)楣拘枨?,要在windows的環(huán)境上做一鍵部署啟動(dòng)java項(xiàng)目,同時(shí)還要支持從安裝界面動(dòng)態(tài)修改配置文件的IP地址。就像安裝軟件一樣將jdk,tomcat,mysql,influxdb,nginx安裝并配置到系統(tǒng)上,順便...

    xbynet 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<