阿里云服务器 suse liniux 下安装mysql

痛苦领悟,在网上找了一堆发现都是转来转去的,自己装了一下

国内mysql 镜像下载 地址http://mirrors.sohu.com/mysql/

我选的是MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm 

和MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm

将这连个包上传到suse linux 服务器

1 、先按装server包

  rpm -ivh MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm 

-----------------------------------------------------------------------------------------

Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]

insserv: warning: script 'S01aliyun-rdate' missing LSB tags
insserv: warning: script 'K01agentwatch' missing LSB tags
insserv: warning: script 'aliyun-rdate' missing LSB tags
insserv: warning: script 'agentwatch' missing LSB tags
mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
2015-08-28 22:46:13 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-28 22:46:13 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting as process 15992 ...
2015-08-28 22:46:13 15992 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-08-28 22:46:13 15992 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-28 22:46:13 15992 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-08-28 22:46:13 15992 [Note] InnoDB: Memory barrier is not used
2015-08-28 22:46:13 15992 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-28 22:46:13 15992 [Note] InnoDB: Using Linux native AIO
2015-08-28 22:46:13 15992 [Note] InnoDB: Using CPU crc32 instructions
2015-08-28 22:46:13 15992 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-28 22:46:13 15992 [Note] InnoDB: Completed initialization of buffer pool
2015-08-28 22:46:13 15992 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-08-28 22:46:13 15992 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-08-28 22:46:13 15992 [Note] InnoDB: Database physically writes the file full: wait...
2015-08-28 22:46:13 15992 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-08-28 22:46:14 15992 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-08-28 22:46:15 15992 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-08-28 22:46:15 15992 [Warning] InnoDB: New log files created, LSN=45781
2015-08-28 22:46:15 15992 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-08-28 22:46:15 15992 [Note] InnoDB: Doublewrite buffer created
2015-08-28 22:46:15 15992 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-28 22:46:15 15992 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-08-28 22:46:15 15992 [Note] InnoDB: Foreign key constraint system tables created
2015-08-28 22:46:15 15992 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-08-28 22:46:15 15992 [Note] InnoDB: Tablespace and datafile system tables created.
2015-08-28 22:46:15 15992 [Note] InnoDB: Waiting for purge to start
2015-08-28 22:46:15 15992 [Note] InnoDB: 5.6.25 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2015-08-28 22:46:16 15992 [Note] Binlog end
2015-08-28 22:46:16 15992 [Note] InnoDB: FTS optimize thread exiting.
2015-08-28 22:46:16 15992 [Note] InnoDB: Starting shutdown...
2015-08-28 22:46:17 15992 [Note] InnoDB: Shutdown completed; log sequence number 1625977




2015-08-28 22:46:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-28 22:46:17 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting as process 16014 ...
2015-08-28 22:46:17 16014 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-08-28 22:46:17 16014 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-28 22:46:17 16014 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-08-28 22:46:17 16014 [Note] InnoDB: Memory barrier is not used
2015-08-28 22:46:17 16014 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-28 22:46:17 16014 [Note] InnoDB: Using Linux native AIO
2015-08-28 22:46:17 16014 [Note] InnoDB: Using CPU crc32 instructions
2015-08-28 22:46:17 16014 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-28 22:46:17 16014 [Note] InnoDB: Completed initialization of buffer pool
2015-08-28 22:46:17 16014 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-28 22:46:17 16014 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-28 22:46:17 16014 [Note] InnoDB: Waiting for purge to start
2015-08-28 22:46:17 16014 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-08-28 22:46:17 16014 [Note] Binlog end
2015-08-28 22:46:17 16014 [Note] InnoDB: FTS optimize thread exiting.
2015-08-28 22:46:17 16014 [Note] InnoDB: Starting shutdown...
2015-08-28 22:46:19 16014 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:


  /usr/bin/mysql_secure_installation


which will also give you the option of removing the test database.
This is strongly recommended for production servers.


See the manual for more instructions.


Please report any problems at http://bugs.mysql.com/


The latest information about MySQL is available on the web at


  http://www.mysql.com


Support MySQL by buying support/licenses at http://shop.mysql.com


New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

---------------------------------------------------------------------

出现以上表示server 安装正常 

进入 cd /etc/init.d/目录

接着执行 ./mysql start 启动mysql服务

然后 命令  netstat -nat 查看下3306端口是否启动

-------------------------------------------------------

Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      

---------------------------------------------------------------

正确启动了安装client

  输入命令 : rpm -ivh MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm 

-------------------------------------------------------------------------

warning: MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]

------------------------------------------------------------------------------

ok安装完毕

接着登陆mysql

1、查看安装时root用户默认生成的秘密

命令: cd /root/

vim  .mysql_secret 

可以看到随机生成的密码02Khos4T8HkIU3_1

------------------------------------------

# The random password set for the root user at Fri Aug 28 22:46:15 2015 (local time): 02Khos4T8HkIU3_1

----------------------------------------------------------

2、登陆mysql

mysql -uroot -u 

pass: 02Khos4T8HkIU3_1

------------------------------------------------------------------

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.25


Copyright (c) 2000, 2015, 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> 

----------------------------------------------------------------------

进去后需要重新设置密码才可以进行数据库的其他操作。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值