彩世界开奖app官网-彩世界平台官方网址(彩票平台)
做最好的网站
来自 彩世界开奖app官网 2019-11-28 05:11 的文章
当前位置: 彩世界开奖app官网 > 彩世界开奖app官网 > 正文

linux-Centos7安装mysql5.7.19彩世界开奖app官网

[root@localhost local]# /usr/local/mysql/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by "root" with grant option;"
[root@localhost local]# /usr/local/mysql/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by "root" with grant option;"

mysqldump 数据库 -u 用户名 -p 密码 > xx.sql

-DWITH_MYISAM_STORAGE_ENGINE=1

cd mysql-5.6.14

 

 

#添加用户组

-DWITH_INNOBASE_STORAGE_ENGINE=1

-DDEFAULT_COLLATION=utf8_general_ci

scripts/mysql_install_db --user=mysql --datadir=/app/mysql/data

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

如: source /home/root/test.sql

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ -DMYSQL_DATADIR=/data/mysql/ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/usr/local/mysql/conf/ -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DWITH_SSL=system -DWITH_ZLIB=system -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost

source 导入数据

-DWITH_READLINE=1

-DWITH_READLINE=1

-DWITH_SSL=system

-DWITH_MYISAM_STORAGE_ENGINE=1

-DENABLED_LOCAL_INFILE=1

先检查一下是还是不是有早前设置的mysql,

编写翻译之后make && make install  长久的等待....之后就安装实现了

结构安顿日常的都以LNMP和LAMP两种格式的,小编那边说的是LNMP的布局地署,nginx、mysql、php、memcache的编写翻翻译并配词置安装, mysql的为主配置、权限的局地难题,后台监察和控制nagio和cacti、zabbix的片段介绍,

彩世界开奖app官网 1

service mysql start

 

useradd mysql -g mysql

接下去能够运转mysql了

chown -R mysql:mysql /app/mysql/data

4.接下来配置运行向,设置开机运转

tar zxvf mysql-5.6.14.tar.gz

  1. cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
  2. chmod  x /etc/init.d/mysqld
  3. chkconfig --add mysqld
  4. chkconfig mysqld on 

mysqldump --opt -d 数据库名 -u 客商名 -p 密码> xx.sql

相通为了安全起见,大家都会创制二个mysql顾客和mysql组,施行以下命令

b. 只导出多少

2017-08-29T13:39:47.241469Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-08-29T13:39:47.241536Z 0 [ERROR] Aborting

yum -y groupinstall "Development tools"

 

暗中认可字体格式 --default-character-set=utf8

自身也不做区分了;那些是搭建lnpm遭逢急需设置的相关依赖包,就全安装完了。

mysqldump 数库 -u 用户名 -p 密码 -B --table 表名 > xx.sql

-DWITH_INNOBASE_STORAGE_ENGINE=1

chown -R mysql:mysql /usr/local/mysql

先用cmake编写翻译,未有这一个命令须求先yum安装

下载地址:

注意 mysql_install_db 已经不复推荐使用了,提出改成 mysqld –initialize 实现实例领头化。

累积新密码:mysqladmin -uroot password新密码

因为开头化--initialize-insecure 是暗中认可未有密码的所以密码不用输入直接规定就能够了;

 

-DDEFAULT_CHARSET=utf8

彩世界开奖app官网 2

[root@localhost]#mkdir -p /data/mysql    

旧密码改正新密码:mysqladmin -uroot -p旧密码 password新密码

-DMYSQL_USER=mysql

yum -y install cmake

 

make install

[root@localhost]#cd mysql-5.7.19.tar.gz

cmake

/usr/local/mysql/bin/mysql -uroot -p

mysqldump -t 数据库名 -u 客户名-p 密码 > xx.sql

 

make clean

假诺起头化失利大概报以下错误,就需求先清空你的/data/mysql目录了,因为mysql目录上边有多少所以初叶化实践中止。

1.1 mysql的源码编写翻译安装,版本Mysql 5.6.14

 

cp support-files/mysql.server /etc/init.d/mysql

 

-DWITH_BLACKHOLE_STORAGE_ENGINE=1

给予mysql权限

mkdir -p /usr/local/mysq

安装好cmake完成!

rpm –qa | grep mysql

ERROR! The server quit without updating PID file (/data/mysql/mysql.pid).

在配备结构早前,先安装一下末尾所急需的部分必备库,

[root@localhost]#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/     #以此是编写翻译安装之后的mysql目录所在地,可自行更正

mysql给权限:

[root@localhost]#tar -zxvf  mysql-5.7.19.tar.gz

-DMYSQL_DATADIR=/app/mysql/data

接下去就施行开端化数据库语句:

source /home/root/XX.sql 只好用mysql -uroot -padmin 登入后技术选择

-DMYSQL_DATADIR=/data/mysql/               #本条针对数据目录

mysql校正密码:

彩世界开奖app官网 3

/usr/local/mysql/bin/mysqld_safe &

2.选项源码包,通用版点击下载

设置必备库

-DWITH_MEMORY_STORAGE_ENGINE=1

1.4、导入数据sources

-DMYSQL_UNIX_ADDR=/tmp/mysql.sock

chkconfig mysql on

接下去再登陆测量试验一回密码更改成功未有就做到啦!

grant 权限 on 数据库.* 客商名@登入主机 identified by “密码”

-DWITH_ARCHIVE_STORAGE_ENGINE=1

-DWITH_MEMORY_STORAGE_ENGINE=1

 

如果有,就删除

-DSYSCONFDIR=/usr/local/mysql/conf/

-DDEFAULT_CHARSET=utf8

3.解压缩编制写翻译

-DDEFAULT_COLLATION=utf8_general_ci

chown -R mysql:mysql mysql

Mysql的编写翻译安装和局地开展

/usr/local/mysql/bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql

mysqldump 导出多少

-DWITH_ZLIB=system -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost    #从MySQL 5.7.5初叶Boost库是必不可少安装的

彩世界开奖app官网 4

 

d. 导出特定表

 

刷新:fulsh privileges

先安装相关注重包

ln -s /usr/local/mysql/bin/mysql /usr/sbin

[root@localhost mysql-5.7.19]# yum install cmake

rpm -e --nodeps mysql // 强力删除格局,假若使用方面命令删除时,提醒有依靠的此外文件,则用该命令能够对其举办武力删除

-DMYSQL_TCP_PORT=3306

1.3、数据库备份mysqldump

 

make

网址:

-DMYSQL_TCP_PORT=3306

 

例子:grant all on *.* to root@10.240.53.98 identified by "123456"

/usr/local/mysql/bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql

1.5、数据库矫正密码mysqladmin

安装达成现在路线/usr/local/ 下边会有一个索引 mysql,那一个目录就是自己编写翻译安装设置的门路-DCMAKE_INSTALL_PREFIX=/usr/local/mysql/

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql

 

-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock

 

ln -s /usr/local/mysql/bin/mysql /usr/bin

linux-Centos7安装mysql5.7.19彩世界开奖app官网。 

##########################################################################

假如登陆报错

-DMYSQL_USER=mysql

 yum install

groupadd mysql

[client]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8mb4
[mysqld]
port = 3306
socket = /tmp/mysql.sock
basedir = /usr/local/mysql
datadir = /data/mysql
pid-file = /data/mysql/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1
init-connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
#skip-name-resolve
#skip-networking
back_log = 300
max_connections = 1000
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 128
max_allowed_packet = 4M
binlog_cache_size = 1M
max_heap_table_size = 8M
tmp_table_size = 16M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 8M
join_buffer_size = 8M
key_buffer_size = 4M
thread_cache_size = 8
query_cache_type = 1
query_cache_size = 8M
query_cache_limit = 2M
ft_min_word_len = 4
log_bin = mysql-bin
binlog_format = mixed
expire_logs_days = 30
log_error = /data/mysql/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /data/mysql/mysql-slow.log
performance_schema = 0
explicit_defaults_for_timestamp
#lower_case_table_names = 1
skip-external-locking
default_storage_engine = InnoDB
#default-storage-engine = MyISAM
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
bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 8M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
interactive_timeout = 28800
wait_timeout = 28800
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
read_buffer = 4M
write_buffer = 4M

如: mysqldump shop_data -u root -p admin > shop_data.sql

直接下载就能够了,不用登录

linux-Centos7安装mysql5.7.19彩世界开奖app官网。a. 只导出表构造

1.下载mysql

如: mysqldump --opt -d shop_data -u root -p admin >onlystruct_shop_data.sql

那步很器重,如果未有初叶化直接开发银行数据库会报错

-DENABLED_LOCAL_INFILE=1

 

##########################################################################

 

linux-Centos7安装mysql5.7.19彩世界开奖app官网。cd /usr/local/mysql

 

编写翻译安装,要用cmake来指引安装,所以要先安装cmake

#添加用户mysql 到用户组mysql

mkdir -p /app/mysql/log

 

chown -R mysql:mysql /app/mysql/log

 可径直复制下方编写翻译语句:

rpm -e mysql //普通删除格局

登陆测量检验

如: mysqldump --t shop_data -u root -p admin > onlydata_shop_data.sql

检查一下你运维数据库成功没  可实践  ps -ef | grep mysql  看看进度是或不是开发银行状态

-DWITH_ARCHIVE_STORAGE_ENGINE=1

-DWITH_BLACKHOLE_STORAGE_ENGINE=1

cd /app

创建数量目录 

yum install -y gcc gcc-c make cmake zlib zlib-devel openssh openssl openssl-devel net-snmp pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel xinetd lrzsz dos2unix telnet python-devel mysql-devel libxslt-devel unixODBC-devel sqlite-devel

 pcre pcre-devel zlib zlib-devel openssl openssl-devel gd gd-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel lua-devel
 autoconf libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel libidn libidn-devel libtool libtool-libs libevent-devel libevent openldap openldap-devel nss_ldap openldap-clients openldap-servers libtool-ltdl libtool-ltdl-devel bison libgcrypt php-mcrypt libmcrypt libmcrypt-devel cmake gcc gcc-c ncurses-devel perl-Data-Dumper libicu-devel libquadmath-devel python-devel bzip2-devel

1.2 数据库账号权限

 

mkdir -p /app/mysql/data

空密码不安全所以大家还要设置密码,上面三令五申中的"root"即是安装密码区域,小编的密码设置为root,可活动更正

如: mysqldump shop_data -u root -p admin -B --table user > user.sql

 

c. 导出全部数据和布局

彩世界开奖app官网 5

清空之后再另行初阶化

 

彩世界开奖app官网 6

 

useradd -g mysql mysql

 

如下图:

配置/etc/my.cnf,若无my.cnf可机关新建加多 ,  仅供参照他事他说加以考察

groupadd mysql

service mysqld start

本文由彩世界开奖app官网发布于彩世界开奖app官网,转载请注明出处:linux-Centos7安装mysql5.7.19彩世界开奖app官网

关键词: