MySQL5.6_Linux安装

合集下载

mysql 5.6安装

mysql 5.6安装

1.1.1安装MySQL5.6文件下载:10.45.15.23 tnms/Tnms@2018/home/tnms/mysql-5.6.12-linux-glibc2.5-x86_64.tar --安装包/home/tnms/f --配置文件a) 准备工作创建mysql用户[root@centos /]# useradd -s /sbin/nologin -M mysql文件上传opt路径下解压文件[root@centos opt]# gunzip mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz [root@centos opt]# tar -xvf mysql-5.6.37-linux-glibc2.12-x86_64.tar重命名为mysql[root@centos opt]# mv mysql-5.6.37-linux-glibc2.12-x86_64 mysql b) 文件配置f文件复制[root@centos opt]# cp /opt/mysql/support-files/f /etc/f •编辑/etc/f#二进制安装,默认配置文件在/etc/f[root@centos opt]# vi /etc/f清空f里面内容,将以下内容粘贴进去[client]port = 3306socket = /opt/mysql/mysql.sock[mysql]#这个配置段设置启动MySQL服务的条件;在这种情况下,no-auto-rehash确保这个服务启动得比较快。

no-auto-rehashport=3306default-character-set=utf8[mysqld]character-set-server = utf8user = mysqlport = 3306socket = /opt/mysql/mysql.sockbasedir = /opt/mysqldatadir = /opt/mysql/dataopen_files_limit = 10240server_id = 10back_log = 600#在MYSQL暂时停止响应新请求之前,短时间内的多少个请求可以被存在堆栈中。

linuxCentOS6.5yum安装mysql5.6

linuxCentOS6.5yum安装mysql5.6

linuxCentOS6.5yum安装mysql5.6本⽂为⼤家分享了linux yum安装mysql5.6简单过程,供⼤家参考,具体内容如下1.新开的云服务器,需要检测系统是否⾃带安装mysql# yum list installed | grep mysql2.如果发现有系统⾃带mysql,果断这么⼲# yum -y remove mysql-libs.x86_643.随便在你存放⽂件的⽬录下执⾏,这⾥解释⼀下,由于这个mysql的yum源服务器在国外,所以下载速度会⽐较慢,还好mysql5.6只有79M⼤,⽽mysql5.7就有182M了,所以这是我不想安装mysql5.7的原因# wget /mysql-community-release-el6-5.noarch.rpm4.接着执⾏这句,解释⼀下,这个rpm还不是mysql的安装⽂件,只是两个yum源⽂件,执⾏后,在/etc/yum.repos.d/ 这个⽬录下多出mysql-community-source.repo和mysql-community.repo# rpm -ivh mysql-community-release-el6-5.noarch.rpm5.这个时候,可以⽤yum repolist mysql这个命令查看⼀下是否已经有mysql可安装⽂件#yum repolist all | grep mysql6.安装mysql 服务器命令(⼀路yes):# yum install mysql-community-server7.安装成功后# service mysqld start8.由于mysql刚刚安装完的时候,mysql的root⽤户的密码默认是空的,所以我们需要及时⽤mysql的root⽤户登录(第⼀次回车键,不⽤输⼊密码),并修改密码# mysql -u root# use mysql;# update user set password=PASSWORD("这⾥输⼊root⽤户密码") where User='root';# flush privileges;9.查看mysql是否⾃启动,并且设置开启⾃启动命令# chkconfig --list | grep mysqld# chkconfig mysqld on10.mysql安全设置(系统会⼀路问你⼏个问题,看不懂复制之后翻译,基本上⼀路yes):# mysql_secure_installation以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。

5.6版本MySQL的下载、安装及配置过程

5.6版本MySQL的下载、安装及配置过程

下载及安装MySQL自MySQL版本升级到5.6以后,其安装及配置过程和原来版本发生了很大的变化,下面详细介绍5.6版本MySQL的下载、安装及配置过程。

图1.1 MySQL5.6目前针对不同用户,MySQL提供了2个不同的版本:MySQL Community Server:社区版,该版本完全免费,但是官方不提供技术支持。

MySQL Enterprise Server:企业版,它能够高性价比的为企业提供数据仓库应用,支持ACID事物处理,提供完整的提交、回滚、崩溃恢复和行级锁定功能。

但是该版本需付费使用,官方提供电话及文档等技术支持。

目前最新的MySQL版本为MySQL 5.6,可以在官方网站(/downloads/)上面下载该软件。

在下图1.2所示的MySQL官网上单击右下角的“MySQL Installer 5.6”超链接,然后按照提示一步步操作就可以将MySQL软件下载到本地计算机中了。

注意这里我们选择的是数据库版本是“Windows (x86, 32-bit), MSI Installer”,如下图1.3所示。

图1.2 MySQL官方网站图1.3 选择MySQL版本MySQL下载完成后,找到下载到本地的文件,按照下面所示的步骤双击进行安装:步骤1:双击MySQL安装程序(mysql-installer-community-5.6.10.1),会弹出如下图1.4所示的欢迎窗口。

图1.4 MySQL欢迎界面步骤2:单击图1.4中的“Install MySQL Products”文字,会弹出的用户许可证协议窗口,如下图1.5所示。

图1.5 用户许可证协议窗口步骤3:选中“I accept the license terms”的前面的选择框,然后点击【Next】按钮,会进入查找最新版本界面,效果如下图1.6所示:图1.6 查找最新版本窗口步骤4:单击【Execute】按钮,会进入安装类型设置界面,效果如下图1.7所示。

Linux下安装及配置MySQL详细过程(自己实践总结)

Linux下安装及配置MySQL详细过程(自己实践总结)

Red Hat Linux下安装及配置MySQL的详细教程大致思路如下:1.下载所需的安装包(Linux下用wget下载,笔者在window下下载的,用XSHELL命令RZ上传到Linux中)2.安装MySQL3.创建新用户并授权安装及配置的详细步骤如下:第一步:检测系统版本信息Linux命令: cat /proc/versionLinux version 2.6.32-220.el6.i686 (mockbuild@) (gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC) ) #1 SMP Wed Nov 9 08:02:18 EST 2011当前Linux版本为RedHat 4.4.5-6(为内核版本)Linux命令:cat /etc/issueRed Hat Enterprise Linux Server release 6.2 (Santiago)Kernel \r on an \mLinux命令: uname -a 或getconf LONG_BITLinux localhost.localdomain 2.6.32-220.el6.i686 #1 SMP Wed Nov 9 08:02:18 EST 2011 i686 i686 i386 GNU/Linux可以看到当前系统为32位的(而64位系统会有x64字符串显示出来)。

第二步:根据Linux系统的环境,下载mysql Community Server官方下载地址: /downloads/mysql/可以选择【Linux-Generic】,下载对应的RMP包.由于当前系统为redhat(64位),所以直接选择Oracle &Red Hat Linux 4 & 5。

Mysql安装包有很多,作用也不同,大多数情况下只需要安装MySQL-Server和MySQL-Client,其它包根据需要安装.32位的下载下面的两个安装包文件:MySQL-server-5.6.11-2.linux_glibc2.5.i386.rpmMySQL-client-5.6.11-2.linux_glibc2.5.i386.rpm(而64位下载下面两个安装包文件:MySQL-server-5.6.11-2.linux_glibc2.5.x86_64.rpmMySQL-client-5.6.11-2.linux_glibc2.5.x86_64.rpm)第三步: 安装MySQL安装顺序: 先安装服务器,然后再安装客户端。

mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz 安装

mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz 安装

mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz 安装mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz下载系统版本:[vb]view plain copyprint?1.[mysql@localhost scripts]$ uname -a2.Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26UTC 2013 x86_64 x86_64 x86_64 GNU/Linux解压:[vb]view plain copyprint?1.[root@localhost mysql]# tar -zxf mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz -C /usr/local/创建mysql用户:[vb]view plain copyprint?1.[root@localhost mysql]# useradd mysql设置mysql用户密码:[vb]view plain copyprint?1.[root@localhost mysql]# echo '123456'|passwd --stdin mysql设置权限:[vb]view plain copyprint?1.[root@localhost mysql]# cd /usr/local[vb]view plain copyprint?1.[root@localhost local]# chown -R mysql:mysql mysql/切换到mysql用户[vb]view plain copyprint?1.[root@localhost local]# su - mysql[vb]view plain copyprint?1.[mysql@localhost ~]$ cd /usr/local/mysql/scripts/安装:[vb]view plain copyprint?1.[mysql@localhost scripts]$ /usr/local/mysql/scripts/mysql_install_db--user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &输出信息:[vb]view plain copyprint?1.[mysql@localhost scripts]$ /usr/local/mysql/scripts/mysql_install_db--user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &2.Installing MySQL system tables...2016-04-17 07:41:40 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for _timestamp server option (see documentation for more details).3.2016-04-17 07:41:40 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.30) starting as process 3394 ...4.2016-04-17 07:41:40 3394 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)5.6.2016-04-17 07:41:40 3394 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)7.8.2016-04-17 07:41:40 3394 [Note] InnoDB: Using atomics to ref count buffer pool pages9.2016-04-17 07:41:40 3394 [Note] InnoDB: The InnoDB memory heap is disabled10.2016-04-17 07:41:40 3394 [Note] InnoDB: Mutexes and rw_locks use GCC atomicbuiltins11.2016-04-17 07:41:40 3394 [Note] InnoDB: Memory barrier is not used12.2016-04-17 07:41:40 3394 [Note] InnoDB: Compressed tables use zlib 1.2.313.2016-04-17 07:41:40 3394 [Note] InnoDB: Using Linux native AIO14.2016-04-17 07:41:40 3394 [Note] InnoDB: Using CPU crc32 instructions15.2016-04-17 07:41:40 3394 [Note] InnoDB: Initializing buffer pool, size = 128.0M16.2016-04-17 07:41:40 3394 [Note] InnoDB: Completed initialization of buffer pool17.2016-04-17 07:41:41 3394 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!18.2016-04-17 07:41:41 3394 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB19.2016-04-17 07:41:41 3394 [Note] InnoDB: Database physically writes the filefull: wait...20.2016-04-17 07:41:41 3394 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB21.2016-04-17 07:41:42 3394 [Note] InnoDB: Setting log file ./ib_logfile1 sizeto 48 MB22.2016-04-17 07:41:44 3394 [Note] InnoDB: Renaming log file ./ib_logfile101 to./ib_logfile023.2016-04-17 07:41:44 3394 [Warning] InnoDB: New log files created, LSN=4578124.2016-04-17 07:41:44 3394 [Note] InnoDB: Doublewrite buffer not found: creating new25.2016-04-17 07:41:44 3394 [Note] InnoDB: Doublewrite buffer created26.2016-04-17 07:41:44 3394 [Note] InnoDB: 128 rollback segment(s) are active.27.2016-04-17 07:41:44 3394 [Warning] InnoDB: Creating foreign key constraint system tables.28.2016-04-17 07:41:44 3394 [Note] InnoDB: Foreign key constraint system tablescreated29.2016-04-17 07:41:44 3394 [Note] InnoDB: Creating tablespace and datafile system tables.30.2016-04-17 07:41:44 3394 [Note] InnoDB: Tablespace and datafile system tables created.31.2016-04-17 07:41:44 3394 [Note] InnoDB: Waiting for purge to start32.2016-04-17 07:41:44 3394 [Note] InnoDB: 5.6.30 started; log sequence number33.2016-04-17 07:41:45 3394 [Note] Binlog end34.2016-04-17 07:41:45 3394 [Note] InnoDB: FTS optimize thread exiting.35.2016-04-17 07:41:45 3394 [Note] InnoDB: Starting shutdown...36.2016-04-17 07:41:46 3394 [Note] InnoDB: Shutdown completed; log sequence number 162597737.OK38.39.Filling help tables...2016-04-17 07:41:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).40.2016-04-17 07:41:46 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.30) starting as process 3417 ...41.2016-04-17 07:41:46 3417 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)43.2016-04-17 07:41:46 3417 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)44.45.2016-04-17 07:41:46 3417 [Note] InnoDB: Using atomics to ref count buffer pool pages46.2016-04-17 07:41:46 3417 [Note] InnoDB: The InnoDB memory heap is disabled47.2016-04-17 07:41:46 3417 [Note] InnoDB: Mutexes and rw_locks use GCC atomicbuiltins48.2016-04-17 07:41:46 3417 [Note] InnoDB: Memory barrier is not used49.2016-04-17 07:41:46 3417 [Note] InnoDB: Compressed tables use zlib 1.2.350.2016-04-17 07:41:46 3417 [Note] InnoDB: Using Linux native AIO51.2016-04-17 07:41:46 3417 [Note] InnoDB: Using CPU crc32 instructions52.2016-04-17 07:41:46 3417 [Note] InnoDB: Initializing buffer pool, size = 128.0M53.2016-04-17 07:41:46 3417 [Note] InnoDB: Completed initialization of buffer pool54.2016-04-17 07:41:46 3417 [Note] InnoDB: Highest supported file format is Barracuda.55.2016-04-17 07:41:46 3417 [Note] InnoDB: 128 rollback segment(s) are active.56.2016-04-17 07:41:46 3417 [Note] InnoDB: Waiting for purge to start57.2016-04-17 07:41:46 3417 [Note] InnoDB: 5.6.30 started; log sequence number162597758.2016-04-17 07:41:46 3417 [Note] Binlog end59.2016-04-17 07:41:46 3417 [Note] InnoDB: FTS optimize thread exiting.60.2016-04-17 07:41:46 3417 [Note] InnoDB: Starting shutdown...61.2016-04-17 07:41:48 3417 [Note] InnoDB: Shutdown completed; log sequence number 162598762.OK63.64.To start mysqld at boot time you have to copy65.support-files/mysql.server to the right place for your system66.67.PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !68.To do so, start the server, then issue the following commands:69.70. /usr/local/mysql/bin/mysqladmin -u root password 'new-password'71. /usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password'new-password'72.73.Alternatively you can run:74.75. /usr/local/mysql/bin/mysql_secure_installation77.which will also give you the option of removing the test78.databases and anonymous user created by default. This is79.strongly recommended for production servers.80.81.See the manual for more instructions.82.83.You can start the MySQL daemon with:84.85. cd . ; /usr/local/mysql/bin/mysqld_safe &86.87.You can test the MySQL daemon with mysql-test-run.pl88.89. cd mysql-test ; perl mysql-test-run.pl90.91.Please report any problems at /92.93.The latest information about MySQL is available on the web at94.95. 96.97.Support MySQL by buying support/licenses at 98.99.New default config file was created as /usr/local/mysql/f and100.will be used by default by the server when you start it.101.You may edit this file to change server settings102.103.WARNING: Default config file /etc/f exists on the system104.This file will be read by default by the MySQL server105.If you do not want to use this, either remove it, or use the106.--defaults-file argument to mysqld_safe when starting the server这里可能会报错:scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory。

linux下MySQL安装登录及操作

linux下MySQL安装登录及操作

linux下MySQL安装登录及操作二、安装Mysql1、下载MySQL的安装文件安装MySQL需要下面两个文件:MySQL-server-4.0.16-0.i386.rpmMySQL-client-4.0.16-0.i386.rpm下载地址为:/downloads/mysql-4.0.html,打开此网页,下拉网页找到“Linux x86 RPM downloads”项,找到“Server”和“Client programs”项,下载需要的上述两个rpm文件。

2、安装MySQLrpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。

该命令在安装时常用的参数是–ivh ,其中i表示将安装指定的rmp软件包,V表示安装时的详细信息,h表示在安装期间出现“#”符号来显示目前的安装过程。

这个符号将持续到安装完成后才停止。

1)安装服务器端在有两个rmp文件的目录下运行如下命令:[root@test1 local]# rpm -ivh MySQL-server-4.0.16-0.i386.rpm显示如下信息。

warning: MySQL-server-4.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5Preparing...########################################### [100%]1:MySQL-server########################################### [100%]。

(省略显示)/usr/bin/mysqladmin -u root password 'new-password'/usr/bin/mysqladmin -u root -h test1 password 'new-password'。

CentOS 6.0安装MySQL 5.6及配置

CentOS 6.0安装MySQL 5.6及配置

CentOS 6.0安装MySQL 5.6及配置从今年3月份开始mysql官网开始发布相关的5.6系列的各个版本,对于mysql5.6系列的版本对一起的版本进行了全局性的细节性加强;个人感觉,以下是在虚拟机中配置的mysql5.6.10源码安装的过程分享记录下:一、必要软件包安装:[root@mysql5~]#yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurse s-devel libmcrypt* libtool-ltdl-devel* make cmake二、编译安装:[root@mysql5 ~]# groupadd mysql[root@mysql5 ~]# useradd -r -g mysql mysql[root@mysql5 ~]# lsanaconda-ks.cfg install.log install.log.syslog mysql-5.6.10.tar.gz[root@mysql5 ~]# cd /usr/local/[root@mysql5 local]# lsbin etc games include lib libexec sbin share src[root@mysql5 local]# cp /root/mysql-5.6.10.tar.gz /usr/local/[root@mysql5 local]# lltotal 34468drwxr-xr-x 2 root root 4096 Jan 27 2010 bindrwxr-xr-x 2 root root 4096 Jan 27 2010 etcdrwxr-xr-x 2 root root 4096 Jan 27 2010 gamesdrwxr-xr-x 2 root root 4096 Jan 27 2010 includedrwxr-xr-x 2 root root 4096 Jan 27 2010 libdrwxr-xr-x 2 root root 4096 Jan 27 2010 libexec-rw-r--r-- 1 root root 35174149 Apr 17 00:55 mysql-5.6.10.tar.gzdrwxr-xr-x 2 root root 4096 Jan 27 2010 sbindrwxr-xr-x 4 root root 4096 Apr 17 00:32 sharedrwxr-xr-x 2 root root 4096 Jan 27 2010 src[root@mysql5 local]# tar -zxvf mysql-5.6.10.tar.gz[root@mysql5 local]# cd mysql-5.6.10[root@mysql5 local]# cmake . ###编译报如下错误暂不管[ 63%] Building CXX object sql/CMakeFiles/sql.dir/sql_.o/root/mysql-5.6.13/sql/sql_: In member function ‘void Optimize_table_order::best_access_path(JOIN_TAB*, table_map, uint, bool, double, POSITION*, POSITION*)’:/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_start_key’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_max_loose_keypart’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_records’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::best_loose_scan_key’may be used uninitialized in this function/root/mysql-5.6.13/sql/sql_:431: warning: ‘loose_scan_opt.Loose_scan_opt::quick_max_loose_keypart’may be used uninitialized in this function[root@mysql5 local]# make && make install三、配置MySQL[root@mysql5 mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql[root@mysql5 mysql-5.6.10]#[root@mysql5 mysql-5.6.10]# cd /usr/local/mysql/scripts/[root@mysql5 scripts]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/dataInstalling MySQL system tables...2013-04-17 01:26:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:26:58 18715 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:26:58 18715 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:26:58 18715 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:26:58 18715 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:26:58 18715 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:26:58 18715 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:26:58 18715 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2013-04-17 01:26:59 18715 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Database physically writes the file full: wait...2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2013-04-17 01:26:59 18715 [Warning] InnoDB: New log files created, LSN=457812013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer not found: creating new2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer created2013-04-17 01:26:59 18715 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:26:59 18715 [Warning] InnoDB: Creating foreign key constraint system tables. 2013-04-17 01:26:59 18715 [Note] InnoDB: Foreign key constraint system tables created2013-04-17 01:26:59 18715 [Note] InnoDB: Creating tablespace and datafile system tables. 2013-04-17 01:26:59 18715 [Note] InnoDB: Tablespace and datafile system tables created.2013-04-17 01:26:59 18715 [Note] InnoDB: Waiting for purge to start2013-04-17 01:26:59 18715 [Note] InnoDB: 1.2.10 started; log sequence number 02013-04-17 01:26:59 18715 [Note] Binlog end2013-04-17 01:26:59 18715 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:26:59 18715 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:00 18715 [Note] InnoDB: Shutdown completed; log sequence number 1625977 OKFilling help tables...2013-04-17 01:27:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:27:00 18738 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:27:00 18738 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:27:00 18738 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:27:00 18738 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:27:00 18738 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:27:00 18738 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:27:00 18738 [Note] InnoDB: Highest supported file format is Barracuda.2013-04-17 01:27:00 18738 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:27:00 18738 [Note] InnoDB: Waiting for purge to start2013-04-17 01:27:01 18738 [Note] InnoDB: 1.2.10 started; log sequence number 16259772013-04-17 01:27:01 18738 [Note] Binlog end2013-04-17 01:27:01 18738 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:27:01 18738 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:02 18738 [Note] InnoDB: Shutdown completed; log sequence number 1625987 OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/local/mysql/bin/mysqladmin -u root password 'new-password'/usr/local/mysql/bin/mysqladmin -u root -h mysql5.6 password 'new-password'Alternatively you can run:/usr/local/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd . ; /usr/local/mysql/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web at Support MySQL by buying support/licenses at New default config file was created as /usr/local/mysql/f and will be used by default by the server when you start it.You may edit this file to change server settingsWARNING: Default config file /etc/f exists on the systemThis file will be read by default by the MySQL serverIf you do not want to use this, either remove it, or use the--defaults-file argument to mysqld_safe when starting the server[root@mysql5 scripts]#[root@mysql5 scripts]# cd /usr/local/mysql/support-files/[root@mysql5 support-files]# cp mysql.server /etc/rc.d/init.d/mysql cp: overwrite `/etc/rc.d/init.d/mysql'? y[root@mysql5 support-files]# cp f /etc/fcp: overwrite `/etc/f'? y[root@mysql5 support-files]#[root@mysql5 support-files]# chkconfig -add mysql-add: unknown option[root@mysql5 support-files]# chkconfig --add mysql[root@mysql5 support-files]# chkconfig mysql on[root@mysql5 support-files]# service mysql startStarting MySQL. [ OK ] [root@mysql5 support-files]#[root@mysql5 data]# mysql -u mysql -p -S /tmp/mysql.sockEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.6.10 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>mysql> status;--------------mysql Ver 14.12 Distrib 5.0.77, for RedHat-linux-gnu (i686) using readline 5.1Connection id: 1Current database:Current user: mysql@localhostSSL: Not in useCurrent pager: stdoutUsing outfile: ''Using delimiter: ;Server version: 5.6.10 Source distributionProtocol version: 10Connection: Localhost via UNIX socketServer characterset: latin1Db characterset: latin1Client characterset: latin1Conn. characterset: latin1UNIX socket: /tmp/mysql.sockUptime: 3 min 38 secThreads: 1 Questions: 5 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.022--------------mysql>四、远程登录及常用命令1、mysql服务的启动和停止net stop mysqlnet start mysql2、本地登陆mysql及远程登录语法如下:mysql -u用户名-p用户密码键入命令mysql –uroot -p,回车后提示你输入密码,输入12345,然后回车即可进入到mysql 中了,mysql的提示符是:mysql>注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP但被远程登录的mysql服务器需增加登录账号,方法如下:mysql>GRANT ALL PRIVILEGES ON*.* TO USER1@’%’ IDENTIFIED BY ’password’mysql>FLUSH PRIVILEGES;3、增加新用户格式:grant 权限on 数据库.* to 用户名@登录主机identified by "密码"如,增加一个用户user1密码为password1,让其可以在本机上登录,并对所有数据库有查询、插入、修改、删除的权限。

Linux离线安装mysql5.6详细步骤

Linux离线安装mysql5.6详细步骤

Linux离线安装mysql5.6详细步骤⼀、安装MySQL1、下载安装包 mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz2、卸载系统⾃带的Mariadbrpm -qa|grep mariadb //查询已安装的mariadbrpm -e --nodeps ⽂件名//卸载,⽂件名为使⽤rpm -qa|grep mariadb 命令查出的所有⽂件3、删除etc⽬录下的f⽂件(如果没有就直接新建)rm /etc/f4、执⾏以下命令来创建mysql⽤户组groupadd mysql5、执⾏以下命令来创建⼀个⽤户名为mysql的⽤户并加⼊mysql⽤户组useradd -g mysql mysql6、将下载的⼆进制压缩包放到/usr/local/⽬录下。

7、解压安装包tar -zxvf mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz8、将解压好的⽂件夹重命名为mysqlmv mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz mysql9、在etc下新建配置⽂件f,并在该⽂件内添加以下代码:[mysql]# 设置mysql客户端默认字符集default-character-set=utf8socket=/var/lib/mysql/mysql.sock[mysqld]skip-name-resolve#设置3306端⼝port=3306socket=/var/lib/mysql/mysql.sock# 设置mysql的安装⽬录basedir=/usr/local/mysql# 设置mysql数据库的数据的存放⽬录datadir=/usr/local/mysql/data# 允许最⼤连接数max_connections=200# 服务端使⽤的字符集默认为8⽐特编码的latin1字符集character-set-server=utf8# 创建新表时将使⽤的默认存储引擎default-storage-engine=INNODBlower_case_table_names=1max_allowed_packet=16M10、创建步骤9中⽤到的⽬录并将其⽤户设置为mysqlmkdir /var/lib/mysqlmkdir /var/lib/mysql/mysqlchown -R mysql:mysql /var/lib/mysqlchown -R mysql:mysql /var/lib/mysql/mysql11、进⼊安装mysql软件⽬录cd /usr/local/mysqlchown -R mysql:mysql ./ #修改当前⽬录拥有者为mysql⽤户./scripts/mysql_install_db --user=mysql #安装数据库chown -R mysql:mysql data #修改当前data⽬录拥有者为mysql⽤户到此数据库安装完成!⼆、配置MySQL1、授予f的最⼤权限。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Mysql安装过程(linux:2.6.18-194.el5,Mysql:)1、安装[root@RAC2 mysql]# rpm -ivh MySQL-server-5.6.12-2.rhel5.x86_64.rpm Preparing...########################################### [100%]1:MySQL-server########################################### [100%][root@RAC2 mysql]# rpm -ivh MySQL-client-5.6.12-2.rhel5.x86_64.rpm Preparing...########################################### [100%]1:MySQL-client########################################### [100%]2、安装完查看默认3306端口没有开[root@RAC2 mysql]# netstat -natActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:833 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:111 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:631 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:25 0.0.0.0:* LISTENtcp 0 0 :::22 :::* LISTENtcp 00 ::ffff:192.168.72.5:22 ::ffff:192.168.72.1:63851 ESTABLISHEDtcp 00 ::ffff:192.168.72.5:22 ::ffff:192.168.72.1:62929 ESTABLISHED3、将mysql启动[root@RAC2 init.d]# service mysql startStarting MySQL..[确定]4、再次确认端口是打开的[root@RAC2 init.d]# netstat -natActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:833 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:111 0.0.0.0:*LISTENtcp 0 0 127.0.0.1:631 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:25 0.0.0.0:* LISTENtcp 0 0 :::3306 :::* LISTENtcp 0 0 :::22 :::* LISTENtcp 00 ::ffff:192.168.72.5:22 ::ffff:192.168.72.1:63851 ESTABLISHEDtcp 00 ::ffff:192.168.72.5:22 ::ffff:192.168.72.1:62929 ESTABLISHED5、连接mysql[root@RAC2 bin]# mysql -u rootERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)在网上查资料,可以这样来解决:[root@RAC2 bin]# /etc/init.d/mysql stopShutting down MySQL..[确定][root@RAC2 bin]# mysqld_safe --user=mysql --skip-grant-tables--skip-networking &[1] 6025[root@RAC2 bin]# 130716 19:00:36 mysqld_safe Logging to'/var/lib/mysql/RAC2.err'.130716 19:00:36 mysqld_safe Starting mysqld daemon with databases from/var/lib/mysql[root@RAC2 bin]# mysql -u root mysqlReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.6.12 MySQL Community Server (GPL)Copyright (c) 2000, 2013, 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 respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || test |+--------------------+4 rows in set (0.00 sec)mysql> use mysql;Database changedmysql> show tables;+---------------------------+| Tables_in_mysql |+---------------------------+| columns_priv || db || event || func || general_log || help_category || help_keyword || help_relation || help_topic || innodb_index_stats || innodb_table_stats || ndb_binlog_index || plugin || proc || procs_priv || proxies_priv || servers || slave_master_info || slave_relay_log_info || slave_worker_info || slow_log || tables_priv || time_zone || time_zone_leap_second || time_zone_name || time_zone_transition || time_zone_transition_type || user |+---------------------------+28 rows in set (0.00 sec)mysql> desc user;+------------------------+-----------------------------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+------------------------+-----------------------------------+------+-----+---------+-------+| Host | char(60) | NO |PRI | | || User | char(16) | NO |PRI | | || Password | char(41) | NO | | | || Select_priv | enum('N','Y') | NO | | N | || Insert_priv | enum('N','Y') | NO | | N | || Update_priv | enum('N','Y') | NO | | N | || Delete_priv | enum('N','Y') | NO | | N | || Create_priv | enum('N','Y') | NO | | N | || Drop_priv | enum('N','Y') | NO | | N | || Reload_priv | enum('N','Y') | NO | | N | || Shutdown_priv | enum('N','Y') | NO | | N | || Process_priv | enum('N','Y') | NO | | N | || File_priv | enum('N','Y') | NO | | N | || Grant_priv | enum('N','Y') | NO | | N | || References_priv | enum('N','Y') | NO | | N | || Index_priv | enum('N','Y') | NO | | N | || Alter_priv | enum('N','Y') | NO | | N | || Show_db_priv | enum('N','Y') | NO | | N | || Super_priv | enum('N','Y') | NO | | N | || Create_tmp_table_priv | enum('N','Y') | NO || Lock_tables_priv | enum('N','Y') | NO | | N | || Execute_priv | enum('N','Y') | NO | | N | || Repl_slave_priv | enum('N','Y') | NO | | N | || Repl_client_priv | enum('N','Y') | NO | | N | || Create_view_priv | enum('N','Y') | NO | | N | || Show_view_priv | enum('N','Y') | NO | | N | || Create_routine_priv | enum('N','Y') | NO | | N | || Alter_routine_priv | enum('N','Y') | NO | | N | || Create_user_priv | enum('N','Y') | NO | | N | || Event_priv | enum('N','Y') | NO | | N | || Trigger_priv | enum('N','Y') | NO | | N | || Create_tablespace_priv | enum('N','Y') | NO | | N | || ssl_type | enum('','ANY','X509','SPECIFIED') | NO | | | || ssl_cipher | blob | NO | | NULL | || x509_issuer | blob | NO | | NULL | || x509_subject | blob | NO | | NULL | || max_questions | int(11) unsigned | NO | | 0 | || max_updates | int(11) unsigned | NO | | 0 | || max_connections | int(11) unsigned | NO | | 0 | || max_user_connections | int(11) unsigned | NO | | 0 | || plugin | char(64) | YES | | | || authentication_string | text | YES || password_expired | enum('N','Y') | NO | | N | |+------------------------+-----------------------------------+------+-----+---------+-------+43 rows in set (0.00 sec)mysql> select hosr,user,password from user;ERROR 1054 (42S22): Unknown column 'hosr' in 'field list'mysql> select host,user,password from user;+-----------+------+-------------------------------------------+| host | user | password |+-----------+------+-------------------------------------------+| localhost | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || RAC2 | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || 127.0.0.1 | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || ::1 | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C |+-----------+------+-------------------------------------------+4 rows in set (0.00 sec)mysql> update user set password=password('root123') where user='root'and host='localhost';Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> commit-> ;Query OK, 0 rows affected (0.00 sec)执行下面这一句,是因为上面使表处于:The MySQL server is running with the--skip-grant-tables option,如果不执行下面这句,即使连上数据库也执行不了操作。

相关文档
最新文档