FC7下mysql安装与启动
一:安装
无论你喜欢的是哪种LINUX套件,它都有可能带有MySQL。Slackware,Ret Hat,SusE和Debian中都在它们的当前版本中包含了它,这将提供一种最简单的方式来快速安装和运行MySQL。如果你的发行版本中没有提供MySQL软件包,或者你想得到最新的版本,你可以从MySQL的网站:www.mysql.com上下载二进制包或源代码包。
在Fedora 7的的桌面左上方,点击如下:
“应用程序“-->“添加/删除软件“,在弹出的对话软件更新安装列表首页中,选择“服务器“,然后选择右面的 MySQL进行安装即可。
在MySQL的安装过程中,安装脚本会为你自动创建一个初始数据库。同样,你也能得到一个用于启动和停止服务的init.d脚本(通常位于/etc/rc.d/init.d目录中)mysqld或mysql.
二:启动
安装后,可以以root身份使用/etc/rc.d/init.d/myqsld(或是mysql) start命令来启动服务器.也可以用 serviceconf命令启动图形化界面来启动mysql。
[root@localhost init.d]# /etc/rc.d/init.d/mysqld start
初始化 MySQL 数据库: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
 
相关文档:
很多朋友都有过这样的经历,将mysql升级到4.1(或以上)版本后,旧的程序从数据库读出来的都变成乱码了.这个问题网上很多这方面的讨论,其实手册上已经有关于这方面的详细说明,
以下内容摘自mysql手册,
产生这个问题的原因是:
MySQL 4.1.x开始支持以下这些事情
· 使 ......
1. 在/etc/my.cnf中加入一下内容
[mysqld_dev]
socket=/tmp/mysql.sock
port=3307
pid-file=/var/run/mysqld/mysqld_dev.pid
datadir=/var/lib/mysql_dev
log=/var/log/mysqld_dev.log
log-error=/var/log/mysqld_dev.err.log
user=mysql
2. 根据以上内容创建目录和文件
mkdir /var/lib/mysqld_dev
chown mys ......
昨天,我突然想把一个数据库里的每个表,以及每个表的非空总纪录数存在另一个表里面。
首先,创建了一个存放数据的表:
create table tables
(
name varchar(50),
number int
);
insert into tables select table_name from information_schema.tables where table_shema = 'test';
但是不知道有没有方法,将非空的 ......