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本地可以连接但是远程连不上的问题,没有记录,今天在云上新申请的服 ...
随机推荐
- javascript函数式编程一例分析
js像其他动态语言一样是可以写高阶函数的,所谓高阶函数是可以操作函数的函数.因为在js中函数是一个彻彻底底的对象,属于第一类公民,这提供了函数式编程的先决条件. 下面给出一个例子代码,出自一本js教程 ...
- The 1st tip of DB Query Analyzer
The 1st tip of DB Query Analyzer Ma Genfeng (Guangdong Unitoll Services incorporate ...
- 如何在centos操作系统上发布.net core的项目
环境:操作系统: centos 7.net core: 2.1.101 官方网站的示例地址: https://docs.microsoft.com/zh-cn/dotnet/core/linux-pr ...
- 排序算法入门之插入排序(java实现)
插入排序思想:相当于插入元素,对于第i个元素,i之前的元素已经是有序的了,这时候将第i个元素依次与前面元素比较,插入合适的位置.
- Strom topology 设计的演进
场景:采集日志数据,日志数据有多个字段组成,需求是根据日志数据中的N个字段(维度),去统计指标数据(个数.平均值)等.
- JNDI 使用
J2EE技术规范(一)——JNDI 分类: java 基础2012-12-02 20:05 1539人阅读 评论(14) 收藏 举报 学习Java,我们首先要掌握的就是十三种技术规范,我们接下来就一步 ...
- Python-Web框架之 - 利用SQLALchemy创建与数据库MySQL的连接, 详解用Flask时会遇到的一些大坑 !
经过这个小项目算是对Django与Flask这两个web框架有了新的认识 , Django本身的轮子非常齐全 , 套路也很固定 , 新手在接触Django框架时 , 不会陷入到处找轮子的大坑 ; 那么 ...
- 【精解】EOS标准货币体系与源码实现分析
EOS智能合约中包含一个exchange合约,它支持用户创建一笔交易,是任何两个基本货币类型之间的交易.这个合约的作用是跨不同币种(都是EOS上的标准货币类型)的,通过各自与EOS主链价值进行锚定,然 ...
- 2017 Gartner数据科学魔力象限出炉,16位上榜公司花落谁家?
https://www.leiphone.com/news/201703/iZGuGfnER4Sv2zRe.html 2017年Gartner数据科学平台(在2016年被称作“高级分析平台”)的魔力象 ...
- Ocelot中文文档-转换Claims
Ocelot允许用户访问claims并把它们转换到头部,请求字符串参数和其他claims中.这仅在用户通过身份验证后才可用. 用户通过身份验证之后,我们运行claims转换中间件.这个中间件允许在授权 ...