ucloud mysql
[root@--- bin]# yum install mysql-server
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Package mysql-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.6.-.el7.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-) = 5.6.-.el7 for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-) >= 5.6. for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.(libnuma_1.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.(libnuma_1.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libnuma.so.()(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-) >= 5.6. for package: mysql-community-client-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-client-5.6.-.el7.x86_64
---> Package mysql-community-common.x86_64 :5.6.-.el7 will be installed
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
---> Package numactl.x86_64 :2.0.-.el6 will be installed
---> Package perl-DBI.x86_64 :1.609-.el6 will be installed
--> Running transaction check
---> Package mysql-community-client.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-client-5.6.-.el7.x86_64
---> Package mysql-community-libs.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-libs-5.6.-.el7.x86_64
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: systemd for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libstdc++.so.(GLIBCXX_3.4.15)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libc.so.(GLIBC_2.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-community-client-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-libs-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: libc.so.(GLIBC_2.)(64bit)
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: systemd
Error: Package: mysql-community-server-5.6.-.el7.x86_64 (mysql56-community)
Requires: libstdc++.so.(GLIBCXX_3.4.15)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@--- bin]#
shell>tar -zxvf mysql-5.7.-linux-glibc2.-x86_64.tar.gz -C /usr/local/
shell>mv mysql-5.7.-linux-glibc2.-x86_64/ mysql
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> cd /usr/local
shell> cd mysql
shell> mkdir mysql-files
shell> chmod mysql-files
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysqld --initialize --user=mysql //这个命令执行完之后会出现默认密码如下图:
[root@--- mysql]# bin/mysqld --initialize -user=mysql
bin/mysqld: error while loading shared libraries: libnuma.so.: cannot open shared object file: No such file or directory
solution(http://blog.csdn.net/sbwfgihc/article/details/16880813):
[root@--- bin]# ./mysqld --initialize --user=mysql
./mysqld: error while loading shared libraries: libnuma.so.: cannot open shared object file: No such file or directory
[root@--- bin]#
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# yum remove libnuma.so.
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: libnuma.so.
Loading mirror speeds from cached hostfile
No Packages marked for removal
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# yum install numactl.x86_64
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package numactl.x86_64 :2.0.-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ==============================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================
Installing:
numactl x86_64 2.0.-.el6 base k Transaction Summary
==============================================================================================================================================================================================
Install Package(s) Total download size: k
Installed size: k
Is this ok [y/N]: y
Downloading Packages:
numactl-2.0.-.el6.x86_64.rpm | kB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : numactl-2.0.-.el6.x86_64 /
Verifying : numactl-2.0.-.el6.x86_64 / Installed:
numactl.x86_64 :2.0.-.el6 Complete!
[root@--- bin]#
[root@--- bin]#
[root@--- bin]#
[root@--- bin]# ./mysqld --initialize --user=mysql
--06T05::.780808Z [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
--06T05::.442494Z [Warning] InnoDB: New log files created, LSN=
--06T05::.641425Z [Warning] InnoDB: Creating foreign key constraint system tables.
--06T05::.709560Z [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: 4bba7d6e-f2a6-11e7-96fb-525400cb5213.
--06T05::.711979Z [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
--06T05::.713290Z [Note] A temporary password is generated for root@localhost: L9&X;A(t+6ju
[root@--- bin]#
[root@--- bin]# ./mysql_ssl_rsa_setup
Generating a bit RSA private key
..................................................................................................................................................................+++
........................+++
writing new private key to 'ca-key.pem'
-----
Generating a bit RSA private key
........................................................................................................................................................+++
..........................................................................................+++
writing new private key to 'server-key.pem'
-----
Generating a bit RSA private key
......+++
.......................................................................+++
writing new private key to 'client-key.pem'
-----
[root@--- bin]#
[root@--- mysql]# ls -ltr
total
-rw-r--r-- mysql mysql Sep : README
-rw-r--r-- mysql mysql Sep : COPYING
drwxr-xr-x mysql mysql Jan : include
drwxr-xr-x mysql mysql Jan : man
drwxr-xr-x mysql mysql Jan : bin
drwxr-xr-x mysql mysql Jan : lib
drwxr-xr-x mysql mysql Jan : support-files
drwxr-xr-x mysql mysql Jan : share
drwxr-xr-x mysql mysql Jan : docs
drwxr-x--- mysql mysql Jan : mysql-files
drwxr-xr-x mysql mysql Jan : data
[root@--- mysql]#
[root@--- mysql]# chown -R root .
[root@--- mysql]# ls -ltr
total
-rw-r--r-- root mysql Sep : README
-rw-r--r-- root mysql Sep : COPYING
drwxr-xr-x root mysql Jan : include
drwxr-xr-x root mysql Jan : man
drwxr-xr-x root mysql Jan : bin
drwxr-xr-x root mysql Jan : lib
drwxr-xr-x root mysql Jan : support-files
drwxr-xr-x root mysql Jan : share
drwxr-xr-x root mysql Jan : docs
drwxr-x--- root mysql Jan : mysql-files
drwxr-xr-x root mysql Jan : data
[root@--- mysql]#
[root@--- mysql]# bin/mysqld_safe --user=mysql &
[]
[root@--- mysql]# Logging to '/usr/local/mysql/data/10-23-52-37.err'.
--06T06::.479595Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
--06T06::.218467Z mysqld_safe mysqld from pid file /usr/local/mysql/data/---.pid ended
^C
[]+ Done bin/mysqld_safe --user=mysql
[root@--- mysql]#
shell> bin/mysql_ssl_rsa_setup # MySQL 5.7. and up
shell> chown -R root .
shell>bin/mysqld_safe --user=mysql & //(坑)执行这步的是为了生成pid,当你看到以.pid ended结尾,就可以ctrl+c,而且这一步mysql已经启动了,你需要执行ps -ef|grep mysqld,然后将mysql进程kill掉,然后在进行一下命令
shell>cd ..
shell> sudo support-files/mysql.server start //开启mysql,他会报错,需要修改/etc/my.cnf下的socket=/tmp/mysql.sock,修改完成后再次启动mysql
shell> cp support-files/mysql.server /etc/init.d/mysql.server//设置开机启动
[root@--- mysql]# support-files/mysql.server start
Starting MySQL.Logging to '/usr/local/mysql/data/10-23-52-37.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/---.pid).
[root@--- mysql]#
[root@--- mysql]#
[root@--- mysql]# chown -R mysql.mysql /usr/local/mysql/data/
[root@--- mysql]#
[root@--- mysql]#
[root@--- mysql]# pwd
/usr/local/mysql
[root@--- mysql]#
[root@--- mysql]# support-files/mysql.server start
Starting MySQL.Logging to '/usr/local/mysql/data/10-23-52-37.err'.
SUCCESS!
[root@--- mysql]#
[root@--- bin]# ./mysql
ERROR (): Access denied for user 'root'@'localhost' (using password: NO)
[root@--- bin]# ./mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7. Copyright (c) , , 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> status
ERROR (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql>
mysql>
mysql>
mysql> set PASSWORD=PASSWORD('123qwe!@#QWE')
-> ;
Query OK, rows affected, warning (0.01 sec) mysql>
http://blog.csdn.net/Suubyy/article/details/78274070?locationNum=8&fps=1
ucloud mysql的更多相关文章
- 叶金荣:MySQL通用优化技巧
转自:http://mp.weixin.qq.com/s?__biz=MjM5NDE0MjI4MA==&mid=208777870&idx=1&sn=6efddd6283e4d ...
- 国内云存储对比: 阿里云、腾讯云、Ucloud、首都在线
阿里云的数据存储<http://www.aliyun.com/product/rds/> RDS — 关系型数据库服务(Relational Database Service,简称RDS) ...
- 通过云主机(网关机)远程登录内网mysql
国内的一些云主机平台(UCloud,阿里云,腾讯云等)走的都是网关机+内网机(即局域网)模式,网关机代理外网访问,不能直接连接内网机器.本文介绍通过远程登录云主机,并设置本地代理的方式,通过sqlyo ...
- mysql配置utf8_mb4
http://blog.csdn.net/u013145194/article/details/51527389 注:以上是转载,但我实际使用的时候,修改配置文件重启数据库,然后修改表的类型即可 20 ...
- UCloud首尔机房整体热迁移是这样炼成的
小结: 1.把两个机房在逻辑上变成一个机房: 2.新老机房的后端服务使用同一套 ZooKeeper,但是配置的却是不同的 IP: 3.UCloud内部服务所使用的数据库服务为MySQL, 内部MySQ ...
- MySQL复制异常大扫盲:快速溯源与排查错误全解
MySQL复制异常大扫盲:快速溯源与排查错误全解https://mp.weixin.qq.com/s/0Ic8BnUokyOj7m1YOrk1tA 作者介绍王松磊,现任职于UCloud,从事MySQL ...
- 五大常见的MySQL高可用方案
1. 概述 我们在考虑MySQL数据库的高可用的架构时,主要要考虑如下几方面: 1.1 如果数据库发生了宕机或者意外中断等故障,能尽快恢复数据库的可用性,尽可能的减少停机时间,保证业务不会因为数据 ...
- UCloud上LAMP小型站点搭建与測试
文件夹 介绍 LAMP环境搭建 打开UCloud防火墙 WordPress安装 应用測试 介绍 本篇博客旨在通过介绍搭建一个WordPress博客的过程介绍在UCloud的云主机(UHOST)上搭建单 ...
- MySQL远程连接不上的解决方法
这篇文章主要为大家详细介绍了MySQL远程连接不上的解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 之前遇到过MySQL本地可以连接但是远程连不上的问题,没有记录,今天在云上新申请的服 ...
随机推荐
- Android Studio使用Lint进行代码检查
Android Studio目前已经更新到1.4版本,它作为Google官方推荐的IDE,功能非常强大,其中提供了一套静态代码分析工具,它可以帮助我们检查项目中存在的问题,让我们更有规范性的开发App ...
- OpenGL Shader Key Points (2)
1. Uniform 1.1. Uniform变量 不是所有的变量都是跟顶点一一对应的,如变换矩阵,光源位置等. Uniform变量可以在任何类型的shader中使用,但只能作为输入值,不能在sh ...
- 任务管理器中的PID找不到
PID是Process ID的简称,这对WINDOWS开发人员来说是非常有用的信息,但对于普通用户来说则根本不必去理会. 举个例子来说: 在网站发布的时候,需要安装IIS,那么iis的tcp的80 ...
- 【Android 应用开发】Android之Bluetooth编程
Android Bluetopth 编程大牛文章 http://my.oschina.net/u/994235/blog?catalog=313604 ViewGroup 相关资料 : http:// ...
- linux上部署rmi+memcache服务
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/50020437 最近在学习linux上搭建Rmi+Memca ...
- html5中新增的属性和删除的属性
一.表单新增的属性 1.对input(type="text").select.textarea与button元素指定autofocus属性,它以指定属性的方式让元素在画面打开时自动 ...
- IT咨询顾问:一次吐血的项目救火
年后的一个合作公司上线了一个子业务系统,对接公司内部的单点系统.我收到该公司的技术咨询:项目启动后没有规律的突然无法登录了,重新启动后,登录一断时间后又无法重新登录,对方技术人员一头雾水不知道什么原因 ...
- Django(一)入门基础——hello world
环境配置 windows7 python3.6 Django 2.0 PyCharm 2018.1 专业版(PS:不建议社区版,因为被"阉割"了很多功能,比如cmd的Termina ...
- 基于libevent的tcp拆包分包库
TCP/IP协议虽然方便,但是由于是基于流的传输(UDP是基于数据报的传输),无论什么项目,总少不了解决拆包分包问题. 以前的项目总是每个程序员自己写一套拆包分包逻辑,实现的方法与稳定性都不太一致.终 ...
- Android面试题摘录
本文中面试题全部选自<精通Android>(英文名“Pro android 4”)一书的章后面试题,不过这套面试题与书中内容结合比较紧密,所以选择使用时请谨慎. ####C2:Androi ...