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
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
下载安装过程中,会提示输入root密码
安装C语言编程接口:
sudo apt-get install libmysqlclient15-dev
更多api 查看:http://dev.mysql.com/doc/refman/5.0/en/c.html
相关mysql头文件和库文件安装在/usr/include/mysql/和/usr/lib/mysql目 ......
很多朋友都有过这样的经历,将mysql升级到4.1(或以上)版本后,旧的程序从数据库读出来的都变成乱码了.这个问题网上很多这方面的讨论,其实手册上已经有关于这方面的详细说明,
以下内容摘自mysql手册,
产生这个问题的原因是:
MySQL 4.1.x开始支持以下这些事情
· 使 ......
mysql设置密码和修改密码:
/usr/local/mysql/bin/mysqladmin -uroot password 123456 第一次设密码。
mysqladmin -uroot -p password mypasswd 修改密码
输入这个命令后,需要输入root的原密码,然后root的密码将改为mypasswd。
就是mysql5导出的有default-charact的设置,mysql4不支持,需要加skip-opt参数,如:
my ......
by ZaraByte
How to do a SQL Injection for MYSQL Server 5.0+
1. Find a vulnerable add a ‘ at the end of the site example: news.php?id=1 add a ‘ at the end of the 1 and see if you get a syntax error
2. order by #–
Keep upping the # until you get an error.
3. union all select 1 ......
一、设置数据库编码
安装mysql时可选择编码,如果已经安装过,可以更改文件my.ini(此文件在mysql的安装目录下)中的配制以达到目的;打开文件找到两处:
[client]
port=3306
[mysql]
default-character-set=gb2312
# The default character set that will be used when a new
schema or table is
# created and
n ......