Linux系统下安装配置MySQL时出现问题及解决过程
在配置Linux下MySQL时候主要经历一下步骤:1、下载rpm,并且安装。问题:在安装完毕server后,出现输入mysql命令出错,并且在修改
在配置Linux下MySQL时候主要经历一下步骤:
1、下载rpm,并且安装。问题:在安装完毕server后,出现输入mysql命令出错,,并且在修改密码时候/usr/bin/下没有mysqladmin。解决:没有安装客户端造成。
2、修改密码:mysqladmin -uroot password123456;密码为123456。注意格式。执行成功
3、修改字符集,找了/etc/下,没有找到my.cnf。解决需要拷贝一个/usr/share/下my-huge.cnf ,my-innodb-heavy-4G.cnf ,my-large.cnf ,my-medium.cnf ,my-small.cnf这几个文件,选一个适合你的(针对你服务器的用途),把它copy到/etc下。我选的是my-medium.cnf。
# cp ./my-medium.cnf /etc/my.cnf
给两部分地方添加
[mysql]
default-character-set=utf8
[mysqlId]
default-character-set=utf8
4、重启mysql
/usr/bin/mysqladmin -uroot -p***** shutdown //关闭服务
/etc/init.d/mysql start //启动服务
查看当前编码格式:
mysql> show variables like 'character_set_%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
OK。基本上配置成功。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)
