数据库学习之--Linux下Mysql源码包安装

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介:

系统环境

操作系统:RedHat EL6

DB Soft:  Mysql 5.6.4-m7

Mysql 在linux下的安装方式有两种版本,一种为Binary(二进制),另外一种为Source(源码包),本文为Source Install方式。

1、安装前的准备

解压安装包


[oracle@ogg ~]$ ls

1
mysql-5.6.4-m7  mysql-5.6.4-m7.tar.gz  mysql-5.6.4-m7.tar.zip  ogg  oradiag_oracle  Readme--?+?.htm

[oracle@ogg ~]$ cd mysql-5.6.4-m7

1
2
3
4
5
[oracle@ogg mysql-5.6.4-m7]$ ls
BUILD        CMakeLists.txt   COPYING              extra               libmysql     mysql-test  README   sql-bench   support-files  vio
BUILD-CMAKE  cmd-line-utils   dbug                 include             libmysqld    mysys       regex    sql-common  tests          win
client       config.h.cmake   Docs                 INSTALL-SOURCE      libservices  packaging   scripts  storage     unittest       zlib
cmake        configure.cmake  Doxyfile-perfschema  INSTALL-WIN-SOURCE  man          plugin      sql      strings     VERSION

[oracle@ogg mysql-5.6.4-m7]$ tar zxvf mysql-5.6.4-m7.tar.gz

1
2
3
4
5
6
7
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/safe_process.cc
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/safe_kill_win.cc
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/safe_process_win.cc
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/Base.pm
mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/CMakeLists.txt
……

查看官方安装文档:INSTALL-SOURCE

 To install and use a MySQL binary distribution, the basic command

  sequence looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

 For example, with a compressed tar file source distribution on Unix, the basic installation command

sequence looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

2、准备源码安装所需要的工具和库文件(RedHat 安装光盘)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[root@ogg ~]# rpm -qa |grep make
automake-1.11.1-1.2.el6.noarch
make-3.81-19.el6.i686
 
[root@ogg ~]# rpm -qa |grep bison
bison-2.4.1-5.el6.i686
 
[root@ogg ~]# rpm -qa |grep gcc
gcc-c++-4.4.4-13.el6.i686
libgcc-4.4.4-13.el6.i686
gcc-4.4.4-13.el6.i686
gcc-gfortran-4.4.4-13.el6.i686
compat-libgcc-296-2.96-144.el6.i686
 
[root@ogg ~]# rpm -qa |grep cmake
 
[root@ogg ~]# rpm -qa |grep ncur
ncurses-base-5.7-3.20090208.el6.i686
ncurses-libs-5.7-3.20090208.el6.i686
ncurses-5.7-3.20090208.el6.i686
ncurses-devel-5.7-3.20090208.el6.i686
 
挂载RedHat安装光盘
[root@ogg ~]# mount /dev/cdrom /media/
mount: block device /dev/sr0 is write- protected , mounting read-only
[root@ogg ~]# cd /media/
[root@ogg media]# cd Server/
[root@ogg Server]# ls
Packages  repodata  TRANS.TBL
[root@ogg Server]# cd Packages/
 
[root@ogg Packages]# ls |grep make
automake-1.11.1-1.2.el6.noarch.rpm
cmake-2.6.4-5.el6.i686.rpm
imake-1.0.2-11.el6.i686.rpm
make-3.81-19.el6.i686.rpm
makebootfat-1.4-10.el6.i686.rpm
pacemaker-1.1.2-7.el6.i686.rpm
pacemaker-libs-1.1.2-7.el6.i686.rpm
 
安装cmake
[root@ogg Packages]# rpm -ivh /media/Server/Packages/cmake-2.6.4-5.el6.i686.rpm
warning: /media/Server/Packages/cmake-2.6.4-5.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
    1:cmake                  ########################################### [100%]
[root@ogg Packages]#

3、源码安装,检测编译环境

[root@ogg mysql-5.6.4-m7]# cmake ./

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check  for  working C compiler: /usr/bin/gcc
-- Check  for  working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check  for  working CXX compiler: /usr/bin/c++
-- Check  for  working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking  for  SHM_HUGETLB
-- Looking  for  SHM_HUGETLB - found
-- MySQL 5.6.4-m7
-- Looking  for  sys/types.h
-- Looking  for  sys/types.h - found
-- Looking  for  stdint.h
-- Looking  for  stdint.h - found

......

1
2
3
4
5
6
7
8
9
10
11
12
13
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS
-- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS - Success
-- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC
-- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success
-- Check size of pthread_t
-- Check size of pthread_t - done
-- Performing Test HAVE_PEERCRED
-- Performing Test HAVE_PEERCRED - Success
-- Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.
-- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http: //foo.bar.com:80
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oracle/mysql-5.6.4-m7

可以指定一下参数:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -DCMAKE_INSTALL_PREFIX=/usr/local/mysql          \    #安装路径
# -DMYSQL_DATADIR=/usr/local/mysql/data            \    #数据文件存放位置
# -DSYSCONFDIR=/etc                                \    #my.cnf路径
# -DWITH_MYISAM_STORAGE_ENGINE=1                   \    #支持MyIASM引擎
# -DWITH_INNOBASE_STORAGE_ENGINE=1                 \    #支持InnoDB引擎
# -DWITH_MEMORY_STORAGE_ENGINE=1                   \    #支持Memory引擎
# -DWITH_READLINE=1                                \    #快捷键功能(我没用过)
# -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock               \    #连接数据库socket路径
# -DMYSQL_TCP_PORT=3306                            \    #端口
# -DENABLED_LOCAL_INFILE=1                         \    #允许从本地导入数据
# -DWITH_PARTITION_STORAGE_ENGINE=1                \    #安装支持数据库分区
# -DEXTRA_CHARSETS=all                             \    #安装所有的字符集
# -DDEFAULT_CHARSET=utf8                           \    #默认字符
# -DDEFAULT_COLLATION=utf8_general_ci

4、编译

[root@ogg mysql-5.6.4-m7]# make

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Scanning dependencies of target INFO_BIN
[  0%] Built target INFO_BIN
Scanning dependencies of target INFO_SRC
[  0%] Built target INFO_SRC
Scanning dependencies of target abi_check
[  0%] Built target abi_check
[  1%] Generating common.h
[  1%] Generating help.c
[  1%] Generating help.h
[  1%] Generating vi.h
[  1%] Generating emacs.h
[  1%] Generating fcns.c
[  1%] Generating fcns.h
Scanning dependencies of target edit
......

5、安装

[root@ogg mysql-5.6.4-m7]# make install

1
2
3
4
5
6
7
8
9
10
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_row_sp003.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_mts_crash_safe.inc
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_stm_EE_err2.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_ndb_apply_status.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_mixing_engines.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_extra_col_slave.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/type_conversions.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_row_func003.test
-- Installing: /usr/local/mysql/mysql-test/./extra/rpl_tests/rpl_row_sp002.test
......

@至此,mysql安装完成!


6、数据库配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
初始化数据库
[root @ogg  mysql]#cd /usr/local/mysql
[root @ogg  mysql]# ls
bin  COPYING  data  docs  include  INSTALL-BINARY  lib  man  mysql- 5.6 . 4 -m7  mysql-test  README  scripts  share  sql-bench  support-files
 
[root @ogg  mysql]# chown -R mysql:mysql .
 
[root @ogg  mysql]# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
140917  13 : 51 : 22  InnoDB: The InnoDB memory heap is disabled
140917  13 : 51 : 22  InnoDB: Mutexes and rw_locks use GCC atomic builtins
140917  13 : 51 : 22  InnoDB: Compressed tables use zlib  1.2 . 3
140917  13 : 51 : 22  InnoDB: Using Linux  native  AIO
140917  13 : 51 : 22  InnoDB: CPU does not support crc32 instructions
140917  13 : 51 : 22  InnoDB: Initializing buffer pool, size =  128 .0M
140917  13 : 51 : 22  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a  new  database to be created!
140917  13 : 51 : 22  InnoDB: Setting file ./ibdata1 size to  10  MB
InnoDB: Database physically writes the file full: wait...
 
[root @ogg  mysql]# chown -R mysql:mysql ./data
[root @ogg  mysql]# chmod -R ug+rws .
 
[root @ogg  mysql]# cp support-files/my-medium.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf'? y
 
配置参数文件
[root @ogg  mysql]# vi /etc/my.cnf
[mysqld]
port            =  3306
socket          = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache =  64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
user=mysql
datadir=/usr/local/mysql/data/mysql
default -storage-engine=MyISAM

7、启动数据库

[root@ogg mysql]# bin/mysqld_safe --user=mysql &

[1] 16592

1
2
3
4
5
6
[root @ogg  mysql]#  140917  13 : 56 : 51  mysqld_safe Logging to  '/usr/local/mysql/data/mysql/ogg.err' .
140917  13 : 56 : 51  mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/mysql
140917  13 : 56 : 53  mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql/ogg.pid ended
[ 1 ]+  Done                    bin/mysqld_safe --user=mysql
[root @ogg  mysql]# ps -ef |grep mysql
root      16888   5955   0  13 : 57  pts/ 1     00 : 00 : 00  grep mysql

数据库启动失败!

查看日志:

[root@ogg mysql]# cat /usr/local/mysql/data/mysql/ogg.err

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
140917  13 : 56 : 51  mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/mysql
/usr/local/mysql/bin/mysqld: Table  'mysql.plugin'  doesn't exist
140917  13 : 56 : 51  [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140917  13 : 56 : 51  InnoDB: The InnoDB memory heap is disabled
140917  13 : 56 : 51  InnoDB: Mutexes and rw_locks use GCC atomic builtins
140917  13 : 56 : 51  InnoDB: Compressed tables use zlib  1.2 . 3
140917  13 : 56 : 51  InnoDB: Using Linux  native  AIO
140917  13 : 56 : 51  InnoDB: CPU does not support crc32 instructions
140917  13 : 56 : 51  InnoDB: Initializing buffer pool, size =  128 .0M
140917  13 : 56 : 52  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a  new  database to be created!
140917  13 : 56 : 52  InnoDB: Setting file ./ibdata1 size to  10  MB
InnoDB: Database physically writes the file full: wait...
140917  13 : 56 : 52  InnoDB: Log file ./ib_logfile0 did not exist:  new  to be created
InnoDB: Setting log file ./ib_logfile0 size to  5  MB
InnoDB: Database physically writes the file full: wait...
140917  13 : 56 : 52  InnoDB: Log file ./ib_logfile1 did not exist:  new  to be created
InnoDB: Setting log file ./ib_logfile1 size to  5  MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating  new
InnoDB: Doublewrite buffer created
140917  13 : 56 : 52  InnoDB:  128  rollback segment(s) are active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
140917  13 : 56 : 52  InnoDB: Waiting  for  the background threads to start
140917  13 : 56 : 53  InnoDB:  1.2 . 4  started; log sequence number  0
140917  13 : 56 : 53  [Warning] No existing UUID has been found, so we assume that  this  is the first time that  this  server has been started. Generating a  new  UUID: 6c803c62-3e2f-11e4-9db1-0800270ccfcc.
140917  13 : 56 : 53  [ERROR] Fatal error: Can 't open and lock privilege tables: Table ' mysql.host ' doesn' t exist
140917  13 : 56 : 53  mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql/ogg.pid ended

重新启动数据库

[root@ogg mysql]# cd bin

[root@ogg bin]# ./mysqld

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
./mysqld: Table  'mysql.plugin'  doesn't exist
140917  13 : 58 : 17  [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140917  13 : 58 : 17  InnoDB: The InnoDB memory heap is disabled
140917  13 : 58 : 17  InnoDB: Mutexes  and  rw_locks use GCC atomic builtins
140917  13 : 58 : 17  InnoDB: Compressed tables use zlib  1.2. 3
140917  13 : 58 : 17  InnoDB: Using Linux native AIO
140917  13 : 58 : 17  InnoDB: CPU does  not  support crc32 instructions
140917  13 : 58 : 17  InnoDB: Initializing buffer pool, size =  128. 0M
140917  13 : 58 : 17  InnoDB: Completed initialization of buffer pool
140917  13 : 58 : 17  InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn  48961
140917  13 : 58 : 17   InnoDB: Database was  not  shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information  from  the .ibd files...
InnoDB: Restoring possible half-written data pages  from  the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number  1595695
140917  13 : 58 : 17   InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress  in  percents:  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99
InnoDB: Apply batch completed
140917  13 : 58 : 17  InnoDB:  128  rollback segment(s) are active.
140917  13 : 58 : 17  InnoDB: Waiting  for  the background threads to start
140917  13 : 58 : 18  InnoDB:  1.2. 4  started; log sequence number  1595695
140917  13 : 58 : 18  [Note] Recovering  after  a crash using mysql-bin
140917  13 : 58 : 18  [Note] Starting crash recovery...
140917  13 : 58 : 18  [Note] Crash recovery finished.
140917  13 : 58 : 18  [ERROR] Fatal error: Can 't open and lock privilege tables: Table ' mysql.host ' doesn' t exist

数据库启动失败 

1
140917  13 : 58 : 18  [ERROR] Fatal error: Can 't open and lock privilege tables: Table ' mysql.host ' doesn' t exist

解决方法:

修改/etc/my.cnf

[mysqld]

datadir=/var/lib/mysql

重新指定数据库数据文件的位置!

再次启动Database:

[root@ogg mysql]# bin/mysqld_safe --user=mysql &

1
2
3
4
5
6
[root @ogg  data]# ps -ef |grep mysql
root      16955   5955   0  14 : 03  pts/ 1     00 : 00 : 00  /bin/sh ./mysqld_safe --user=mysql
mysql     17229  16955   0  14 : 03  pts/ 1     00 : 00 : 00  /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/lib/mysql/ogg.err --pid-file=/var/lib/mysql/ogg.pid --socket=/tmp/mysql.sock --port= 3306
 
[root @ogg  data]# netstat -an|grep  3306
tcp         0       0  0.0 . 0.0 : 3306                 0.0 . 0.0 :*                   LISTEN

数据库启动成功!

配置数据库启动脚本,加入系统启动环境

1
2
3
4
5
6
7
8
9
10
11
12
13
[root @ogg  mysql]# cp support-files/mysql.server  /etc/init.d/mysql
 
[root @ogg  mysql]# service mysql stop
Shutting down MySQL.. 140917  14 : 06 : 29  mysqld_safe mysqld from pid file /var/lib/mysql/ogg.pid ended
                                                            [  OK  ]
[ 1 ]+  Done                    ./mysqld_safe --user=mysql  (wd: /usr/local/mysql/bin)
(wd now: /usr/local/mysql)
[root @ogg  data]# netstat -an|grep  3306
 
[root @ogg  mysql]# service mysql start
Starting MySQL..   
[root @ogg  data]# netstat -an|grep  3306
tcp         0       0  0.0 . 0.0 : 3306                 0.0 . 0.0 :*                   LISTEN                                        [  OK  ]

8、连接使用mysql database

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
修改管理员密码
[root@ogg mysql]# cd /usr/local/mysql/
[root@ogg mysql]# ./bin/mysqladmin -u root password
New password:
Confirm  new  password:
 
连接数据库
[root@ogg mysql]# ./bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end  with  or  \g.
Your MySQL connection id is  2
Server version:  5.6. 4 -m7-log Source distribution
Copyright (c)  2000 2011 , 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> select *  from  tab;
ERROR  1046  (3D000): No database selected
 
mysql> use mysql
Database changed
 
mysql> select *  from  tab;
ERROR  1146  (42S02): Table  'mysql.tab'  doesn't exist
mysql> select host,user  from  mysql.user;
+-----------+------+
| host      | user |
+-----------+------+
127.0. 0.1  | root |
| :: 1        | root |
| localhost |      |
| localhost | root |
| ogg       |      |
| ogg       | root |
+-----------+------+
6  rows  in  set ( 0.00  sec)
mysql>

@至此,mysql database安装、连接成功!










本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/1554367,如需转载请自行联系原作者
相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
1月前
|
关系型数据库 MySQL 数据库
Docker Compose V2 安装常用数据库MySQL+Mongo
以上内容涵盖了使用 Docker Compose 安装和管理 MySQL 和 MongoDB 的详细步骤,希望对您有所帮助。
183 42
|
2月前
|
安全 关系型数据库 MySQL
CentOS7仅安装部署MySQL80客户端
通过上述步骤,你可以在CentOS 7上成功安装并配置MySQL 8.0客户端。这个过程确保你能够使用MySQL客户端工具连接和管理远程的MySQL数据库,而不需要在本地安装MySQL服务器。定期更新MySQL客户端可以确保你使用的是最新的功能和安全修复。
293 16
|
3月前
|
关系型数据库 MySQL 数据库
【MySQL基础篇】MySQL概述、Windows下载MySQL8.0超详细图文安装教程
在这一章节,主要介绍两个部分,数据库相关概念及MySQL数据库的介绍、下载、安装、启动及连接。接着,详细描述了MySQL 8.0的版本选择与下载,推荐使用社区版(免费)。安装过程包括自定义安装路径、配置环境变量、启动和停止服务、以及客户端连接测试。此外,还提供了在同一台电脑上安装多个MySQL版本的方法及卸载步骤。最后,解释了关系型数据库(RDBMS)的特点,即基于二维表存储数据,使用SQL语言进行操作,格式统一且便于维护。通过具体的结构图展示了MySQL的数据模型,说明了数据库服务器、数据库、表和记录之间的层次关系。
【MySQL基础篇】MySQL概述、Windows下载MySQL8.0超详细图文安装教程
|
3月前
|
NoSQL 关系型数据库 Redis
《docker高级篇(大厂进阶):1.Docker复杂安装详说》包括:安装mysql主从复制、安装redis集群
《docker高级篇(大厂进阶):1.Docker复杂安装详说》包括:安装mysql主从复制、安装redis集群
146 14
|
2月前
|
关系型数据库 MySQL 应用服务中间件
《docker基础篇:8.Docker常规安装简介》包括:docker常规安装总体步骤、安装tomcat、安装mysql、安装redis
《docker基础篇:8.Docker常规安装简介》包括:docker常规安装总体步骤、安装tomcat、安装mysql、安装redis
161 7
|
3月前
|
关系型数据库 MySQL Linux
Linux下mysql数据库的导入与导出以及查看端口
本文详细介绍了在Linux下如何导入和导出MySQL数据库,以及查看MySQL运行端口的方法。通过这些操作,用户可以轻松进行数据库的备份与恢复,以及确认MySQL服务的运行状态和端口。掌握这些技能,对于日常数据库管理和维护非常重要。
170 8
|
3月前
|
安全 关系型数据库 MySQL
Windows Server 安装 MySQL 8.0 详细指南
安装 MySQL 需要谨慎,特别注意安全配置和权限管理。根据实际业务需求调整配置,确保数据库的性能和安全。
396 9
|
2月前
|
关系型数据库 MySQL 数据库连接
数据库连接工具连接mysql提示:“Host ‘172.23.0.1‘ is not allowed to connect to this MySQL server“
docker-compose部署mysql8服务后,连接时提示不允许连接问题解决
|
3天前
|
消息中间件 缓存 NoSQL
缓存与数据库的一致性方案,Redis与Mysql一致性方案,大厂P8的终极方案(图解+秒懂+史上最全)
缓存与数据库的一致性方案,Redis与Mysql一致性方案,大厂P8的终极方案(图解+秒懂+史上最全)
|
8天前
|
SQL 关系型数据库 MySQL
MySQL生产环境迁移至YashanDB数据库深度体验
这篇文章是作者将 MySQL 生产环境迁移至 YashanDB 数据库的深度体验。介绍了 YashanDB 迁移平台 YMP 的产品相关信息、安装步骤、迁移中遇到的各种兼容问题及解决方案,最后总结了迁移体验,包括工具部署和操作特点,也指出功能有优化空间及暂不支持的部分,期待其不断优化。