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本地可以连接但是远程连不上的问题,没有记录,今天在云上新申请的服 ...
 
随机推荐
- 如何解决Asp.Net中不能上传压缩文件的问题
			
在使用Asp.Net自带的服务器端控件Fileupload上传文件时,可能会出现不能上传压缩文件的问题,此时可以通过下面的方法解决: 在<system.web>中添加: <httpR ...
 - OpenCV 实现分水岭算法
			
种子点的标记没有太搞懂,这个算法的速度还是很快的 // watershed_test20140801.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h&q ...
 - Gradle 1.12用户指南翻译——第三十四章. JaCoCo 插件
			
本文由CSDN博客万一博主翻译,其他章节的翻译请参见: http://blog.csdn.net/column/details/gradle-translation.html 翻译项目请关注Githu ...
 - Linux - 有效群组(effective group)与初始群组(initial group),groups,newgrp
			
每个使用者在他的 /etc/passwd 里面的第四栏有所谓的 GID ,那个 GID 就是所谓的『初始群组 (initial group) 』!也就是说,当用户一登陆系统,立刻就拥有这个群组的相关权 ...
 - 使用代码刷QQ的跨年红包
			
使用的库从这里找: https://github.com/GameTerminator/dont-touch-white 关键代码就是一个while循环加上drag. import com.andro ...
 - 如何在Eclipse CDT中编译含有多个main函数的项目
			
最近在杭电ACM上做题,使用的C++工具是Eclipse,但是Eclipse CDT不能同时存在多个main函数的文件,上网也搜了很多资料,但是按他们的步骤来,还是不能实现自己想要的效果.经过一下午的 ...
 - Oracle常用数据库对象(片段)
			
1:用户和权限 1.1 用户的创建 a)语法--- create user 用户名 identified by 密码: b)创建用户abcd,并设定密码为abcd;---注意:操作数据库对象是 ...
 - javascript随机一个1-9的数字
			
window.onload=function(){ var oTxt=document.getElementById('txt'); for(i=1;i<=200;i ...
 - mybatis源码解读(二)——构建Configuration对象
			
Configuration 对象保存了所有mybatis的配置信息,主要包括: ①. mybatis-configuration.xml 基础配置文件 ②. mapper.xml 映射器配置文件 1. ...
 - Django1.8文档阅读手记
			
主要集中在新特性上. Django1.8好像开始推荐使用python3 Django的QuerySet是延迟加载的,这个文档里面一般会明言,通过Connection SQL显示测试,外键对象也是延迟加 ...