Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4274261
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: Mysql/postgreSQL

2011-08-02 13:06:34

平台: ubuntu10.10

1. 安装:mysql
   sudo apt-get install mysql-server
   在安装的过程中,会提示我们需要设置 mysql的密码,这个密码就是我们以后登陆mysql的密码了

2. 登陆 mysql
  

  1. ywx@ywx:~/yu/mysql$ mysql -u root -p 登陆mysql
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 39
  5. Server version: 5.1.49-1ubuntu8.1 (Ubuntu)

  6. Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  7. This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  8. and you are welcome to modify and redistribute it under the GPL v2 license

  9. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  10. mysql> exit  退出mysql
  11. Bye
  12. ywx@ywx:~/yu/mysql$
3. 还需要配置文件吗 ??本地??外机 ??


4. 参看mysql 安装到哪里去了

  1. ywx@ywx:~/yu/mysql$ dpkg -L mysql-
  2. mysql-client-5.1 mysql-common mysql-server-5.1
  3. mysql-client-core-5.1 mysql-server mysql-server-core-5.1
  4. ywx@ywx:~/yu/mysql$ dpkg -L mysql-server
  5. /.
  6. /usr
  7. /usr/share
  8. /usr/share/doc
  9. /usr/share/doc/mysql-server
  10. /usr/share/doc/mysql-server/copyright
  11. /usr/share/doc/mysql-server/changelog.Debian.gz
  12. ywx@ywx:~/yu/mysql$

5. 参看 数据库文件放在哪里了

  1. mysql> show databases;
  2. +--------------------+
  3. | Database |
  4. +--------------------+
  5. | information_schema |
  6. | mysql |
  7. | test2 |
  8. | test3 |
  9. +--------------------+
  10. 4 rows in set (0.00 sec)

  11. $sudo find / -name test3 > find.txt
放在这里
  1. /var/lib/mysql/test3

参考资料:

            

阅读(366) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~