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就弄到这里。明天开始
相关文档:
1. 给root加密码:/usr/bin/mysqladmin -u root password 123456
2. 导出:mysqldump -u root -p dbname > file.sql
3. 导入:mysql -u root -p dbname < backup-file.sql
4. 授权:grant all on *.* to root@"%" identified by "密码";
5. 收回权限:revoke all privileges on *.* from root@"%";
6. 登录:mys ......
声明:部署DedeCMS,在网上搜了很多资料,包括这个论坛,几乎没有发现在linux下部署的现成资料可以参考。
遂,自己把整个部署过程中一些重要的点记录下来,一是算做自己的劳动成果,同时,期望对曾经和我一样迷茫,不知如何部署   ......
今天使用PowerDesigner搭建了一个小项目,最后执行完SQL脚本时才发现有2张表的表名中间多了一个空格,查完资料,最后并惊奇发现映射文件竟然多了2个`,就是shift+数字键1的那个,也就是他在脚本是这样写的:
create table `table1`(....);
问题解决。
PS:从网上找到的资料:
作为一个Oracle DBA,MySQL很多SQL语法与Orac ......
用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'];
} ......