mysql配置账户(原创)

安装流程请看:  http://worm128.blog.163.com/blog/static/567721492012101361145599/
配置mysql端口:http://drougon.com/post/index/137,http://blog.csdn.net/lawmansoft/article/details/7268473

==================== 服务启动 ========================

启动mysqld服务:
service mysqld start
停止mysqld服务:
service mysqld stop

==================== 进入mysql命令台--配置帐号 ========================
进入mysql目录
cd /usr/local/mysql/bin/
进入命令台
./mysql -u root
跳进mysql数据库
use mysql
查看表
select * from user
执行输出
\g
设置从本地主机登录的root帐号密码:
set password for root@localhost=password('your password');
或:
update user set password=password('your password') where user='root' and host='localhost';

==================== mysql的端口配置 ========================
vi /etc/my.cnf
配置如下
[mysqld]
port  = 3316
socket  = /tmp/mysql3316.sock

skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
#忘记密码设置这行
skip-grant-tables

posted on 2012-11-14 10:34  Winlone囧  阅读(11)  评论(0编辑  收藏

导航