专栏首页xyjincan安装Mysql 5.7 on fedora23 kde

安装Mysql 5.7 on fedora23 kde

安装有多种方式,可以添加源之后直接,更新源,dnf install mysql_server

也可以下载apm包之后直接 rpm install ,初次安装可能需要安装一个包。

depend: mecab mecab-ipadic

大多数情况就是 运行下面这个命令,然后初始化mysql

sudo yum install mysql-community-{server,client,common,libs}-*

资料来自mysql文档

源网站

Installing and Upgrading MySQL

这个是一些安装完之后msql的一些文件分布

Table 2.9 MySQL Installation Layout for Linux RPM Packages from the MySQL Developer Zone(cp from http://dev.mysql.com/doc)

Files or Resources

Location

Client programs and scripts

/usr/bin

mysqld server

/usr/sbin

Configuration file

/etc/my.cnf

Data directory

/var/lib/mysql

Error log file

For RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log For SLES: /var/log/mysql/mysqld.log

Value of secure_file_priv

/var/lib/mysql-files

System V init script

For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld For SLES: /etc/init.d/mysql

Systemd service

For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld For SLES: mysql

Pid file

/var/run/mysql/mysqld.pid

Unix manual pages

/usr/share/man

Include (header) files

/usr/include/mysql

Libraries

/usr/lib/mysql

Socket

/var/lib/mysql/mysql.sock

Miscellaneous support files (for example, error messages and character set files)

/usr/share/mysql

mysql 不会自动开启服务,so 需要先打开一下mysqld

shell> 
 service mysqld start
然后我们就可以在mysql相关日志文件中搜索初始密码啦,查看一下目录,可以尝试下面两个命令
shell> 
 grep 'temporary password' /var/log/mysqld.log
shell> 
 grep 'temporary password' /var/log/mysql/mysqld.log
mysql -uroot -p  输入所查询到的密码即可进入熟悉的mysql

At the initial start up of the server, the following happens, given that the data directory of the server is empty:

  • The server is initialized.
  • An SSL certificate and key files are generated in the data directory.
  • The validate_password plugin is installed and enabled.
  • A superuser account 'root'@'localhost' is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command for RHEL, Oracle Linux, CentOS, and Fedora platform: shell> grep 'temporary password' /var/log/mysqld.log Use the following command for SLES platform: shell> grep 'temporary password' /var/log/mysql/mysqld.log The next step is to log in with the generated, temporary password and set a custom password for the superuser account:
shell> 
 mysql -uroot -p 
mysql> 
 ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; 

Note

MySQL's validate_password plugin is installed by default. This will require that passwords contain at least one upper case letter, one lower case letter, one digit, and one special character, and that the total password length is at least 8 characters.

If something goes wrong during installation, you might find debug information in the error log file /var/log/mysqld.log.

Compatibility with RPM Packages from Other Vendors. If you have installed packages for MySQL from your Linux distribution's local software repository, it is much preferable to install the new, directly-downloaded packages from Oracle using the package management system of your platform (yum, dnf, orzypper), as described above. The command replaces old packages with new ones to ensure compatibility of old applications with the new installation; for example, the old mysql-libs package is replaced with the mysql-community-libs-compat package, which provides a replacement-compatible client library for applications that were using your older MySQL installation. If there was an older version of mysql-community-libs-compat on the system, it also gets replaced.

If you have installed third-party packages for MySQL that are NOT from your Linux distribution's local software repository (for example, packages directly downloaded from a vendor other than Oracle), you should uninstall all those packages before installing the new, directly-downloaded packages from Oracle. This is because conflicts may arise between those vendor's RPM packages and Oracle's: for example, a vendor's convention about which files belong with the server and which belong with the client library may differ from that used for Oracle packages. Attempts to install an Oracle RPM may then result in messages saying that files in the RPM to be installed conflict with files from an installed package.

Debug Package. A special variant of MySQL Server compiled with the debug package has been included in the server RPM packages. It performs debugging and memory allocation checks and produces a trace file when the server is running. To use that debug version, start MySQL with /usr/sbin/mysqld-debug, instead of starting it as a service or with /usr/sbin/mysqld. See Section 24.5.3, “The DBUG Package” for the debug options you can use.

Rebuilding RPMs from source SRPMs. Source code SRPM packages for MySQL are available from the MySQL Yum repository. They can be used as-is to rebuild the MySQL RPMs with the standard rpmbuild tool chain.

root passwords for pre-GA releases. For MySQL 5.7.4 and 5.7.5, the initial random root password is written to the .mysql_secret file in the directory named by the HOME environment variable. When trying to access the file, bear in mind that depending on operating system, using a command such as sudomay cause the value of HOME to refer to the home directory of the root system user . .mysql_secret is created with mode 600 to be accessible only to the system user for whom it is created. Before MySQL 5.7.4, the accounts (including root) created in the MySQL grant tables for an RPM installation initially have no passwords; after starting the server, you should assign passwords to them using the instructions in Section 2.10, “Postinstallation Setup and Testing”."

( ¯(∞)¯ )祝小伙伴们,成功安装,并进入mysql~

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 解决oracle服务占用内存过高的问题

    通常我们在自己电脑上搭建项目环境时,都免不了要安装Oracle。不管你硬件多强悍,都会发现,Oracle服务一旦启用,内存立马吃紧。笔者内存8G,启动一个VS,...

    浩Coding
  • MySQL数据库远程连接、创建新用户、设置权限、更改用户密码

    上篇文章我们写了在服务器上安装MySQL,可以随时远程连接,我们这次讲如何创建一个新的用户,给予权限,并且实现远程连接!

    浩Coding
  • BBQ(生信基础问题)27:GENCODE与Ensembl GTF/GFF到底哪里不同?怎么下载?

      上个BBQ讲到了GTF/GFF3的一些介绍:https://www.jianshu.com/p/3eaeecfa7fd5。 今天我们主要关注的是不同基因注释...

    liu_ll
  • 设置MySQL数据库不区分大小写

    我们大家可能都碰到过这种情况:在Linux下,MySQL的表名区分大小写,而在Windows下是不区分,从Windows下导出的数据脚本中使用的是小写,而Hib...

    浩Coding
  • 如何从Encode数据库上下载数据?

      简单介绍一下Encode这个数据库:它的全称是Encyclopedia of DNA Elements,简称为ENCODE。是由美国国家人类基因组研究所(N...

    liu_ll
  • 继AutoML后,第四范式发布软硬一体化AI集成系统SageOne

    6 月 20 日,AI产品和服务提供商第四范式宣布发布最新 AI 系列产品SageOne Appliance软硬一体化AI集成系统,性能较市面开源工具或GPU解...

    AI科技大本营
  • BBQ(生信基础问题14-15)-BLAST专题&BLAT

    上个BBQ介绍了基于动态规划算法的全局序列比对和局部序列比对,今天这篇笔记简单的介绍一下什么是BLAST和BLAT~

    liu_ll
  • 数据库扫盲

    “上古”时期,计算机还处于幼年,当时对于数据的管理效率很低,也许一个程序会产生一些数据,但计算机所干的事,就是大量的计算工作,计算之后得到一定的结果,人工再把结...

    naget
  • Java EE实用教程笔记----(6)第六章 Struts 2综合应用案例

    本章主要内容是结合前面所学的Struts2框架知识,编写一个简单的借书系统的实例,其实这些主要是JavaWeb的知识,用Struts2开发而已,基础比较扎实的同...

    浩Coding
  • vapor 之 cache记录

    为了后续修改方便我们进行了alias ```typealias IACache = SQLiteCache```

    大话swift

扫码关注云+社区

领取腾讯云代金券