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本地可以连接但是远程连不上的问题,没有记录,今天在云上新申请的服 ...
随机推荐
- AngularJS进阶(七)实现根据不同条件显示不同控件
AngularJS实现根据不同条件显示不同控件 由于项目需求,需要实现根据不同条件显示不同控件的功能.具体要求如下图所示: 即当选择"每单固定减"时,下方只显示"减免金额 ...
- PS 色调——老照片效果
这就是通过调色使照片显得发黄. R_new=0.393*R+0.769*G+0.189*B; G_new=0.349*R+0.686*G+0.168*B; B_new=0.272*R+0.534*G+ ...
- 【Django】 gunicorn部署纪要
使用Gunicorn 来部署Django应用, 没有一步一步写怎么操作,简单记录下重要的点,方面以后查阅. 主要的方式还是Nginx反向代理到Gunicorn, Gunicorn wsgi来启动Dja ...
- mac os x下的一些小技巧
1显示swap空间: sysctl vm.swapusage 其中sysctl中有很多可以控制和查看的项,可以通过sysctl -A列举,另外可以通过man sysctl来查看. 而实际swap文件和 ...
- 配置使用dwr完成收邮件提示
DWR(Direct Web Remoting)是一个用于改善web页面与Java类交互的远程服务器端Ajax开源框架,可以帮助开发人员开发包含AJAX技术的网站.它可以允许在浏览器里的代码使用运行在 ...
- RA layer request failed
新整的Eclipse环境出现这个问题,细化内容是不能connect,后来想起切换Eclipse底层库的事情,然后打开Eclipse的SVN设置.把SVN Client借口由JavaHL改为PureJa ...
- Django中的Python高级特性
本小文的内容实际是作为<Pro Django>第二版第二章的读书笔记简单总结. 1.类的构建:元类,使用带元类的基类----这个特性的案例主要就是models.Model类,用这种方式高效 ...
- CVE-2017-12149 JBOOS AS 6.X 反序列化漏洞利用
检测目录: 返回500 一般就是存在了. 下载工具: http://scan.javasec.cn/java/JavaDeserH2HC.zip 使用方法: javac -cp .:commons-c ...
- python新手---学习第一天
Python是一门跨平台.开源.免费的解释型高级动态编程语言,它支持伪编译将源代码转换成字节码来优化程序提高运行速度和对源码进行保密,并且支持使用py2exe.pyinstaller.cx_Freez ...
- (五)SpringBoot2.0基础篇- Mybatis与插件生成代码
SpringBoot与Mybatis合并 一.创建SpringBoot项目,引入相关依赖包: <?xml version="1.0" encoding="UTF-8 ...