易截截图软件、单文件、免安装、纯绿色、仅160KB

Fedora下Mysql的简单使用

转到附录1(mysql 命令大全 - 命令详解

转到附录2(mysql乱码问题解决方法

在我的Fedora中,在系统安装时我就选择安装了Mysql了,所以就不用再去下载源代码,然后去慢慢编译。哈哈,偷了一个懒。
系统安装好了,Mysql时必不可少的,所以一定要检验一下Mysql可以用不。
首先切换到root账户,然后输入命令:service 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 stony password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
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 /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!     [确定]
正在启动 mysqld:                                                                                [确定]
看来Mysql的服务可以启动起来,应该问题不大了。
马上添加root密码,mysqladmin -u root  password xxxxxx
登录以下,输入命令:mysql -u root -p
请求输入密码,输入密码,进入了!^_^   
到这里,应该基本上可以说Mysql是没有问题的了。时间不早了,今天的Mysql就弄到这里。明天开始


相关文档:

java读取mysql数据库latin1避免乱码方法

写入时,先做encode:
public static String encode(String src) {
String result = null;
try {
result = new String(src.getBytes("gbk"), "ISO-8859-1");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
读出时,再做decode:
public static String deco ......

异构数据库数据同步(从Progress到MySQL)

一直想写点东西,但却迟迟没有开始,今天无意中回到ERP100这个网站,发现有了QAD的专区,于是,一时热血沸腾,写了点东西,就借此机会将内容也发到这里吧,呵呵。
其实内容都是本人写的,不过为了图方便,在ERP100中写完了,然后直接Copy到这里,偷了点懒,呵呵。
以下是正文,在ERP100中的地址是
http://bbs.erp100.com ......

Now it's MySQL's turn...

Some problems encounted this afternoon, when trying to setup/test mysql capabilities on hypnos and virgil.
1.ERROR 2003 (HY000): Can't connect to MySQL server on 'server-name' (111)
access locally (i.e. from localhost) is fine, when trying remotely got this error. when tried with mysql++ library, ......

mysql调用后

用mysql_query,mysql_fetch_array()后应该要
free_result().function count_admin($where = '')
{
if($where) $where = " WHERE $where";
$result = $this->db->get_one("SELECT count(*) as num from $this->table_admin_role $where");
return $result['num'];
} ......

MySQL备份和恢复数据表的方法

关键词:MySQL  备份  恢复
  备份是最简单的保护数据的方法,本节将介绍多种备份方法。为了得到一个一致的备份,在相关的表上做一个LOCK TABLES,你只需一个读锁定,当你在数据库目录中做文件的一个拷贝时,这允许其他线程继续查询该表;当你恢复数据时,需要一个写锁定,以避免冲突。
  使用SQL ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号