• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

MySQL 备忘录_MySQL

mysql 搞代码 4年前 (2022-01-09) 14次浏览 已收录 0个评论

gaodaima.com

在 openSUSE 12.1 操作系统中安装并配置 MySQL 数据库服务器:

$ <strong>sudo zypper install mysql-community-server</strong>$ <strong>sudo vim /etc/my.cnf</strong>[mysqld]sql-mode="TRADITIONAL"$ <strong>sudo /sbin/chkconfig --add mysql</strong>$ <strong>sudo /etc/init.d/mysql start</strong>$ <strong>sudo /usr/bin/mysql_secure_installation</strong>$ <strong>mysql -u root -p****</strong>mysql> CREATE DATABASE test;mysql> GRANT ALL PRIVILEGES ON test.* TO test@"%" IDENTIFIED BY "pwd-for-test";mysql> exit

在 Windows Vista 操作系统使用 MySQL 客户端:

D:/Bin/MySQL/Workbench> <strong>mysql -h test.skyiv.com -u test -ppwd-for-test test</strong>Welcome to the MySQL monitor.  Commands end with ; or /g.Your MySQL connection id is 5Server version: 5.5.16-log Source distributionCopyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql> <strong>select version(),user(),now(),database();</strong>+------------+--------------------+---------------------+------------+| version()  | user()             | now()               | database() |+------------+--------------------+---------------------+------------+| 5.5.16-log | [email protected] | 2012-02-24 19:37:24 | test       |+------------+--------------------+---------------------+------------+1 row in set (0.00 sec)mysql> <strong>select @@sql_mode;</strong>+------------------------------------------------------------------------------------------------------------------------------------------------------+| @@sql_mode                                                                                                                                           |+------------------------------------------------------------------------------------------------------------------------------------------------------+| STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_pISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |+-----------------------------------------------------------------------------------------------------------------------------------------------<strong>本文来源gaodai#ma#com搞@代~码^网+</strong>-------+1 row in set (0.01 sec)mysql> <strong>exit</strong>ByeD:/Bin/MySQL/Workbench>

一些有用的网站:

MySQL :: Developer Zone

中文 MySQL

gaodaima.com


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:MySQL 备忘录_MySQL
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址