haixin3036 发表于 2017-12-12 11:52:06

SUSE11 安装mysql

  SUSE11
  检测系统是否安装MySQL
#rpm -qa | grep -i mysql  若已安装过,会出现:
  MySQL-server-5.0.22-0.i386
  MySQL-client-5.0.22-0.i386
  那么输入以下命令删除它:
  #rpm -ev MySQL-server-5.0.22-0.i386
  # rpm -ev MySQL-client-5.0.22-0.i386
  注意:若删除的时候,出现删除不成功,出现依赖的包,前提必须删除依赖项。rpm -ev dovecot-1.0.7-7.el5.x86_64
  在suse11.2-64上先安装一个本地库: 用国内镜像,注意mysql 5.6.22 由于版本更新,所以可以直接访问http://mirrors.sohu.com/mysql/MySQL-5.6/ 查看新的版本,否则wget 下载不到需要的rpm文件.
  wget -chttp://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-server-5.6.22-1.sles11.x86_64.rpm   (for suse11-64版本)
  wget -chttp://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-client-5.6.22-1.sles11.x86_64.rpm
  wget -chttp://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-devel-5.6.22-1.sles11.x86_64.rpm            
  下载完成后开始安装:
  rpm -ivh MySQL-server-5.6.22-1.sles11.x86_64.rpm MySQL-client-5.6.22-1.sles11.x86_64.rpm MySQL-devel-5.6.22-1.sles11.x86_64.rpm
  Preparing... ###########################################
  1:MySQL-client ########################################### [ 50%]
  2:MySQL-server ###########################################
  warning: user mysql does not exist - using root
  warning: group mysql does not exist - using root
  insserv: Service network is missed in the runlevels 4 to use service mysql
  mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
  2014-12-22 16:36:57 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  2014-12-22 16:36:57 20644 InnoDB: Using atomics to ref count buffer pool pages
  2014-12-22 16:36:57 20644 InnoDB: The InnoDB memory heap is disabled
  2014-12-22 16:36:57 20644 InnoDB: Mutexes and rw_locks use GCC atomic builtins
  2014-12-22 16:36:57 20644 InnoDB: Memory barrier is not used
  2014-12-22 16:36:57 20644 InnoDB: Compressed tables use zlib 1.2.3
  2014-12-22 16:36:57 20644 InnoDB: Using Linux native AIO
  2014-12-22 16:36:57 20644 InnoDB: Using CPU crc32 instructions

  2014-12-22 16:36:57 20644 InnoDB: Initializing buffer pool,>  2014-12-22 16:36:57 20644 InnoDB: Completed initialization of buffer pool
  2014-12-22 16:36:57 20644 InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

  2014-12-22 16:36:57 20644 InnoDB: Setting file ./ibdata1>  2014-12-22 16:36:57 20644 InnoDB: Database physically writes the file full: wait...

  2014-12-22 16:36:57 20644 InnoDB: Setting log file ./ib_logfile101>
  2014-12-22 16:36:57 20644 InnoDB: Setting log file ./ib_logfile1>  2014-12-22 16:36:58 20644 InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
  2014-12-22 16:36:58 20644 InnoDB: New log files created, LSN=45781
  2014-12-22 16:36:58 20644 InnoDB: Doublewrite buffer not found: creating new
  2014-12-22 16:36:58 20644 InnoDB: Doublewrite buffer created
  2014-12-22 16:36:58 20644 InnoDB: 128 rollback segment(s) are active.
  2014-12-22 16:36:58 20644 InnoDB: Creating foreign key constraint system tables.
  2014-12-22 16:36:58 20644 InnoDB: Foreign key constraint system tables created
  2014-12-22 16:36:58 20644 InnoDB: Creating tablespace and datafile system tables.
  2014-12-22 16:36:58 20644 InnoDB: Tablespace and datafile system tables created.
  2014-12-22 16:36:58 20644 InnoDB: Waiting for purge t start
  2014-12-22 16:36:58 20644 InnoDB: 5.6.22 started; log sequence number 0
  A random root password has been set. You will find it in '/root/.mysql_secret'.
  2014-12-22 16:36:58 20644 Binlog end
  2014-12-22 16:36:58 20644 InnoDB: FTS optimize thread exiting.
  2014-12-22 16:36:58 20644 InnoDB: Starting shutdown...
  2014-12-22 16:37:00 20644 InnoDB: Shutdown completed; log sequence number 1625977
  2014-12-22 16:37:00 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  2014-12-22 16:37:00 20666 InnoDB: Using atomics to ref count buffer pool pages
  2014-12-22 16:37:00 20666 InnoDB: The InnoDB memory heap is disabled
  2014-12-22 16:37:00 20666 InnoDB: Mutexes and rw_locks use GCC atomic builtins
  2014-12-22 16:37:00 20666 InnoDB: Memory barrier is not used
  2014-12-22 16:37:00 20666 InnoDB: Compressed tables use zlib 1.2.3
  2014-12-22 16:37:00 20666 InnoDB: Using Linux native AIO
  2014-12-22 16:37:00 20666 InnoDB: Using CPU crc32 instructions

  2014-12-22 16:37:00 20666 InnoDB: Initializing buffer pool,>  2014-12-22 16:37:00 20666 InnoDB: Completed initialization of buffer pool
  2014-12-22 16:37:00 20666 InnoDB: Highest supported file format is Barracuda.
  2014-12-22 16:37:00 20666 InnoDB: 128 rollback segment(s) are active.
  2014-12-22 16:37:00 20666 InnoDB: Waiting for purge to start
  2014-12-22 16:37:00 20666 InnoDB: 5.6.22 started; log sequence number 1625977
  2014-12-22 16:37:00 20666 Binlog end
  2014-12-22 16:37:00 20666 InnoDB: FTS optimize thread exiting.
  2014-12-22 16:37:00 20666 InnoDB: Starting shutdown...
  2014-12-22 16:37:02 20666 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
  linux:~ # more .mysql_secret
  # The random password set for the root user at Mon Dec 22 16:36:58 2014 (local time): lXNgZ2zmMi1MsIht
  linux:/usr # mysql -u root -p
  Enter password:
  Welcome to the MySQL monitor.Commands end with ; or \g.

  Your MySQL connection>  Server version: 5.6.22
  mysql>
  重新设置密码为 123456
页: [1]
查看完整版本: SUSE11 安装mysql