以下内容是根据官方文档翻译的,执行截图是博主自己实测结果。

3.1 Connecting to and Disconnecting from the Server

连接,断开数据库

要连接到mysql 服务器,你需要用户名,user;密码,password

如果你在别的电脑上远程登陆,那么你还需要主机名。你应该这样登陆:

shell> mysql -h host -u user -p
Enter password: ******** host表示主机的地址,user是你的账号名。
shell> mysql -h host -u user -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25338 to server version: 5.5.50-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> 最后面的这个 mysql> 表示mysql已经准备就绪。 如果你在自己的电脑上安装了mysql,你只需要输入下面的命令:
shell> mysql -u user -p

如果你遇到:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'说明你的mysql服务没有运行,你得先启动它。

有些mysql 安装版本允许匿名登陆,输入下面的命令即可
shell> mysql

登陆成功后你随时都可以输入:QUIT或者(q)退出,本人实测中exit也可以。

3.2 Entering Queries

进入查询:

本节内容的前提是你已经连接上mysql服务器

下面是一个简单的查询实例:

mysql> SELECT VERSION(), CURRENT_DATE;

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU0AAACgCAIAAAAHP6l7AAAPLElEQVR4nO2d25WrIBSGbYq0g82oDUwTmiZOAdGpJFkp4TygyG3LJYQ45P/WeThjCMIOP5ub7ob//GsAAHUDnQNQP2V0zrrlcX8+7s/H2Ba4HYiGDfNtYPvfl/629IxOD/4WJf0565aXdX7pb8+1y7g/5+6y53x3XG/49aE138aTXnzFuM6GWUn8uD8f9yMN8NHszuQV4r5apR6m3hzl5KNenv12avorX2s7zFqadjLL307358SNalz3HEJw203NQd6Xqi9pB7fdqHpF/l5meqOJik/VH4XO/6hdfZYP65zQIcGlv7ltR/YgBzp3pWfdorYJ1l3V9sHHsF/OVMiuIuK+ar0u/U02NbK+RHnU7zasW9a6s2G+L/Pun02dU/UK75fddjvUua++Vl3skqTWy5WPLOelv5ldzNy1ztGNnX8OT/Ye+M+/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2k7Y0Zfwou/ebwl+4iPbZWknFb6BZCZcM8tnxcepauc2VNoZ30R+U3fy5KuwmbDVN3CZ5dezYdIvcRAHgbGebn5hjYqXMlMb0Vx3jLmm0iza+iDHPX9rdFX7QL0/nB++12JYvS7mV+8TlZ+HNwRvjPP8PX8VHOEqnrRhaG97N1rvg98ZHLn++zdO2J93a6L3Oazo05udJtKQuH7TQPTLhxkdUctgJHgPk5OCPb/rkixZs+CCde3ioxF9vZsKxiHsjBqlvnQy+1t99OXWOjnmOn5+fyeXh9/1xumwud9+M6aF/WAfalnxMP6kHn4Iyo5+GO3utkjMy1LbGLtpw+D0wMzsehn4l5KTV6L3MGdvfeTbP2U+1k3Z11vwnzaozbwRnRz70qDlNzLNR1AMBfAM+rAVA/0DkA1fMfOwGXy3MkenUAAAAASUVORK5CYII=" alt="" />

这条查询语句说明了mysql的几个特点:

  1.每条语句后面都加上分号“;”,有少数例外,如退出时输入QUIT

  2.当你输入一条查询语句时,mysql将其发送给服务器,执行并返回结果

  3.mysql总是以表格的形式返回结果,第一行是这些列的标签,如果你只是想得到值,mysql也会将其贴上标签,如上面的例子那样。

关键词大小写不敏感:下面三种情况都是可行的。

mysql> SELECT VERSION(), CURRENT_DATE;
mysql> select version(), current_date;
mysql> SeLeCt vErSiOn(), current_DATE; 下面是另一条语句 ,它说明你可以把mysql当作一处简单的计算器来使用
mysql> SELECT SIN(PI()/4), (4+1)*5;

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARYAAAB0CAIAAADPZIr9AAAKAElEQVR4nO2d25mDIBCFbYq0Y5pJrEXTSmInyZcS9sELtxlgDNmgnP9tjY4DwwCiy2kaAAAA4LCoy/h6vl/P96s//9qXfaK6x71T+e2crvfxGrTb9u/H5RSzG7eT5k8uQv6oyzi0+W/5H6jL+HEKna7395yNTx1anaL28aa9vagIsedPlzjHVfcwTn49369ntLnQfra9bWeqjcm+rpnz4No/D8+3EXXL+Ot5W3+h7bN21vLe2Baluof/6+SwU7FhOz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abbE9vYugS9nXyE86dpyijvphU5e8WsaZb1R7cwZJcZsBPqYslen7JjHncMUvbt5x8/JKmjEGsn4M8CszLpjUIxycoy9HZyMa18hrrpMsorVTubu0bXbyqF2MVlxg5zPq9Lw/ljHDcbHOeP9cpFx4y7L+sPY4fxJ0Enx0kh2v/y9HbyYL5kM+u5vPIWX5XgK9QWd6QQyExtcUcKgczUFvfaygsAAAAAAAAAAAAAwGHBLo91UlvcsSEwyExtcUcKgczUFnfoC+F4puPQF4K+EMhCbXHHRA5kpra4I4VAZmqLe23lBQAAAAAAAAAAAAAA/A+n612wy+uPUd1jL64mcbre06UGwAynn/MrfpNCm14aEBuLCvSXgudL7WQjeXNQ0DQNr59THxtSyL9Eqr/Enf+JjtPn0LIagITRyWGZthFa99U3GpC5waQhW2BHItpM9Y793takQ7vubZky07A2vDQHCr93dyTTvLtzvmr5oAWp/hJ3/gYdJ0F5lx/0x5deUJhdvwGLJIV0MHRoGXU3bz9oLVoWvQuxu+8c1JQ+kjvH3XfbOEc6ChG3kOovcefLdZzE5Y3tVY1vYYSIUsjSJx2vyu+PjeP3Tukt8CRiKsQoZHgbezxQl5Eqkd+763OEjcbqNSzH0vWXuPPlOk7S8iZNBw61TPJtRCkUVx8wdX5ubXO69reh71Tyas/nKdSQc0Jf7tfegV6aQm6zluovcedv0nGSlDfBYFolg4UPU4gbhaYUUt1wObX9eFVTRm24y5YUMq9lpLIsMoxCUv0l7vyNOk7asVh5Kecd17CiIOPDFLJDYq8mjUM/Tj3ro78lvkLJmkKWNU8TyT5tq9kVqf5Sij5SwOeoY9y1zMTPcgzPQknwuj00fOdkSMHYmqEhAUYXa1nJmJNIU8i2400ymZW3gHQSBbEiFzZCSpgl6CPFndlSXnMdEity4DcctavGLA78GzHZ0z2CrxPAv4Jv5AAAAAAAAAAAAACAgD9bmeAyvGIsIwAAAABJRU5ErkJggg==" alt="" />

下面这样会单输出,只要你喜欢,你可以输入多条语句
mysql> SELECT VERSION(); SELECT NOW();

aaarticl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rsX5H5eZWcT2q1PiqXeK8dtvrq9pipjKci9WqHo/sqtS1gvXKOrA/EodW5fBRidmTX3X1m3XgpEn43FI2fGvnwwA4LdDqETjOLWUP55ZSA60eA+eB4d2gVYA8QKsAeYBWAfIArQJkwf+0e5skGfsGagAAAABJRU5ErkJggg==" alt="" />
查询语句如果需要多行,mysql是根据你结束的分号来识别的,而不是换行。换句话说就是:mysql的输入格式自由,它接收这些语句,但并不马上执行,而是直到看到分号为止。

下面是一个简单的例子:
mysql> SELECT
-> USER()
-> ,
-> CURRENT_DATE;

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARcAAACaCAIAAAAM6JsxAAAL+0lEQVR4nO2d27myvBZGaQrbwWbUBv4m1CZ2AerdV4Y+q4R9gUAOc4aEYEAc426xIASTlxxI5lv9+/ev+e9/FQBMBhUB5IKKAHJBRQC5oCKAXFARQC6oCCAXVASQSzEV1YfH6/n3ev69zvsCtwMoR+G2qD48slW0O97+3oJ8/t0PuyHlp3C8aq6v26kWcyKe317iHK9Pd+Pk1/Pv9Xwc/UThN1leRUotV9gdb3aND6QcTF87vz48TIXUh6upluYs3x1+mreKmuvrfGrf8Zdmf+nftfXpbr50rT+tNuHSDGk2Z+Odbddgse4257/X89pUMewv9r3CKVdVqorU9PusoiJwGVT0/Ls0bYV+HOvd8dZWJuvdb9Y8rdY2Z2Pk49XgyBYgQCtRv6LPo6L6dA/qGRWBwKCi26ke6pYhnqEW9tKqqne99yvc/mKKIVpF75OD7YBzpjNR4YxzhnTixkXv85truFVERSAwrqJeGPXp7kvCqc3OuzxJRe0IPmGMtL8Y58/TFqEimECEit5Vpz48lAq0O946Idkqqg+P2Xt09mXDOI1xESxGjIraynq/qS9po0baXcH5Zxe8+87bFlX9yLA/jTk6GCNKRWZrYx4RJ+L6Tyu3U22PqazvLfoMRAjnu41xYeh7kXRJ4HuR+S9HM6gIBOK+F1nzCgmkfQsC+E5iVOQPb2JBRfALhFXU9W2mDFqqChXBb8CaboBcUBFAL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Mqn9Rc+7TtD1DZSb4CEWk4/U2lbm4RH8hYY4unIigIv38pMxMeV7Z32nIKnN0Y6x77cLXsNUXNt25KFDRTAhrF74e1i5Egopmg3V0PwsqAsgFFQHkgooAckFFALmgIoBM/g8hX9O0s1sGPwAAAABJRU5ErkJggg==" alt="" />

在这条语句中注意Mysql的提示,由mysql>变成了-->这是在告诉你,我还没有看到结束的分号,我是不会执行的。它在等待你输入剩下的语句,好好利用这些提示吧。

如果你不想执行你输入的语句,那就用"\c"来取消
mysql> SELECT
-> USER()
-> \c
mysql> 同样的注意看提示,-->变成了mysql>说明,你可以重新输入查询语句了。 下面这张表是可能的mysql的提示:
Prompt Meaning
mysql> 准备就绪
-> 等待输入多条语句的一下一句
'> 等待输入由单引号开头语句的结束
"> 双引号,同上
`> 反撇号,同上
/*> 同上
多行输入经常发生在 由于你输入单条语句而忘记加上分号的情况下
mysql> SELECT USER()
-> 如果发生了这种情况,你输入了语句,但mysql在等待你的输入。而你却没有意识到发生了什么,你可能停在这里等待,其实你只需要输入分号,mysql就会执行你的语句。
mysql> SELECT USER()
-> ;

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAACMCAIAAABETyQWAAAIMUlEQVR4nO2d67GkIBCFTcpJh0lGTeAmoSaxAThm4tSEsD98AdJIo46tc77a2qrrYAv04SFKm6i/fwkAgUAugAHkAhhALoAB5AIYQC6AwXfkkmbtu/u8u8+7fH7hcj9EWryaIp3/fuRNm6d0+o18s3dJs3azXB558xmU131e2WO23DmOJ6p+G7WZrKTvT7GOp8VLS/zuPu/O65K0eHW1mv9+VnN6Vv6NxK6CPKvuUynzmKrfxtV35WS5EO4keOSN6VqPZa99Kn2atboU0qzWZaFK99UXVii5cPOvp3/kjd03U/nZo1kSqL9/iarfZdELuVLPamo9afHSm5HxpyF8XeCqJBuEsxiq/AS3Bldjoi0nCVcupP0pq9vkws2/Ia80a42y2FexCnLMkDTIpftUqvdcm6ePvOlLtcjuWCTKParUWsDCVYFt2pf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dqGcqvdcOI2PUuZ6gaNOJjrmLFgZy8V7gWlZM3HFWVDnZfFbrdxwRcVYC7CwGSuIOiBl/xXFn5DfikAudnpWZmPK649/MWfXcGYEoBL2+tCvUugvYiGNV9/L4VnXBRn7vmREAa0AugAHkAhhALoAB5AIYQC6AAeQCGEAugAHkAsL5Dxvb+K0vJpg4AAAAAElFTkSuQmCC" alt="" />


'>">说明你的语句中输入了引号的开头,却没输入结尾,这经常发生在你不小心输入了半边引号导致

(博主推荐成对输入,即(),'',""等成对输入,这能有效防止忘记关闭,同样适用于编程)
mysql> SELECT * FROM my_table WHERE name = 'Smith AND age < 30;
'> 如果你输入了这条语句,按下Enter键,结果什么也没发生,你可能会奇怪怎么这条查询语句要执行那么久,那么你应该看下'>这条线索。 (它说明mysql在等待你的输入,你没注意到它在说,你伢的,怎么不给我加个反引号啊) 如果发生了这种情况,要怎么办呢,这还不简单,输入\c,取消不就行了。 事实上这样做还真不行,因为mysql会把\c解释成''中的一部分,所以最好的办法就是:先加上反引号,再加\c
mysql> SELECT * FROM my_table WHERE name = 'Smith AND age < 30;
'> '\c
mysql> 此时,提示又回到了mysql>,说明你可以接着输入了。 `>重音符的提示和单双引号的类似,说明你虎头蛇尾,只记得开始,却不结束。 这三种情况非常重要 ,因为如果发生了这种情况,后面不管你输入多少都会被mysql忽略掉(不执行),即使你输入了QUIT也一样,这肯定让人火大。 特别是在你在想为什么不能取消这条语句,又傻傻不知道要输入结束的引号的情况下。

3.3 Creating and Using a Database

创建并使用数据库

现在你知道怎么输入sql语句了,那你就可以创建数据库了。

现在假设你有一些宠物,而且你希望能保存一些它们的信息,那么,你就可以大材小用的建立一张表来保存数据,下面来是步骤:

  a.创建数据库

  b.创建数据表

  c.通过不同的方式从表中取回数据

  d.使用多重表格

这个动物园的数据库很简单,但现在却不难想到它在现实中的应用。

通过show命令查看有哪些数据库(注意database加了s)

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAC6CAIAAABk0JUDAAAKd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bvLLS4WSmtJwtLbjcY32uBsPzJ7i8ups4IYYnlU+tJ7m9EhdE567z+RGQQnepAzTN4vDyvTX2+/B2a9nGqO515JCxCVxGW1G5o6bCCx6rPd/uaNbs20sqn1jMxbK6/Wl5Fy7T0NUzUBCv1ankGD6fb49I+urPt3l7FRzvxtq4qLDUHs1BsabUG+2owaau7+XBOOa18sJ4Ew0L5JYPOJfY0s28ZYgMny52R8ww2rRmy4+UZGTdrilverSdFWIF241IxLrwrDFciCEsvn2TMkv4qeRuNqYtTzsLbfOsGumX38rAiwpP33ZP05B1y8ePvCgEAAAAAAAAAAHbAfzzb3xPMzvERAAAAAElFTkSuQmCC" alt="" />

其中的mysql数据库保存了用户的权限信息,test数据库一般默认自动创建,为用户做一些测试用的。

这条命令不会显示那些你没有权限查看的数据库

如果你的机器上也有test数据库,通过下面的命令使用它
mysql> USE test
USE和QUIT一样,不需要分号,当然,如果你有强迫症,为了你的性命着想就加上分号吧,反正加上也没有害处。 USE特殊的另一点是,它不能跨行。 如果你能使用test数据库,那就用吧,但是test数据库上的数据可能被任何其他有权限使用test数据的人删除掉,所以最好建立自己的数据库。 假设你需要使用你的数据库(上面建立的动物园),管理员需要执行下面的命令:
mysql> GRANT ALL ON menagerie.* TO 'your_mysql_name'@'your_client_host';
your_mysql_name 就是你的账户名,your_client_host是你用来登陆服务器的机器地址

3.3.1 Creating and Selecting a Database

创建并选择数据库

如果管理员已经为你建好了数据库,那你只需要用就行了,如果没有,那你得自己动手创建
mysql> CREATE DATABASE menagerie;

注意:在unix上,它是大小写敏感的,在创建数据表时也一样,也就是说,你创建时用的大写,使用时也必须用大写,

在win上,不存在这个问题,但是最好还是保持一致,不要忽大忽小。

如果你遇到了这种错误提示:

ERROR 1044 (42000): Access denied for user 'micah'@'localhost' to database 'menagerie'

说明你信任的那个管理员阴了你一把,没有给你足够的权限,带上砖头找他去吧。

创建数据库并不是说就选择了它,要使用它,你还得选择它

mysql> USE menagerie 

aaarticlea/png;base64,iVBORw0KG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gQqA/gMFOp0d3msDFz/AX4LuJ6I9VXA8nF+iy3/SoqAdQb0GSi3MlB5pAxf/WadX/otUPKL9lV4lRHut9jyr6SIEXHdv8yRcPoMlHI3DJUXPWs8Z776Z773W8BZKdZX4Skf5bfY8K+kiJn9RPoFPgOllFiWm6sqR3lsGggp/7XfQikld1Jyb2LEsOGrgOVj/RbAv0IuxsX8FuQwLuO3IIdDvwUhhBDye3h+BvGx9/wMclX2np9BzieP8zPI+YxZnJ9BzieP8zPI+eRxfgY5nzzOzyDnk8n5GeR0sjg/4x9gV8vJDlI5P4PKSIt0zs+gMlIhtfMzqAxCCCGEEEIIIYQQQgghhBBCCCE58B+r1Ntxkm+XDAAAAABJRU5ErkJggg==" alt="" />

你的数据库只需要创建一次,但是每次使用前你都得选择它才能用。

当然你也可以在登陆时直接选择它:
shell> mysql -h host -u user -p menagerie
Enter password: ********

注意,menagerie不是你的密码,如果你非要在第一行输入密码,那么你就不要用空格。 不要写:mysql -h host -u user -p mima 而应该:mysql -h host -u user -pmima 但是,这种写在同一行的做法是不推荐使用的。

任何时候,你都可以通过下面这条命令来查看当前被选择的数据库:
SELECT DATABASE();

3.3.2 Creating a Table

建表

建表是很容易的,但它是空的,可以通过这条命令查看到:

mysql> SHOW TABLES;

难的是,要怎么组织数据库的结构,建哪些表格,列。

你想保存你宠物的数据库,那可以建个名叫pet的表,最少也要包含名字,还包含一些其他信息,比如,如果你家人也养宠物,那你可能想保存主人的信息。

要不要保存年龄呢,事实上建议你保存生日更合适,因为,年龄会随着时光的飞逝而增加,但生日永远无法改变,而年龄可以通过生日计算出来,blablablabla

我们这里保存的信息包括:name, owner, species, sex, birth, and death.

通过Create Table命令创建这张表的样式
mysql> CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhAAAABBCAIAAAAPLwqlAAAMZUlEQVR4nO2d25XyOgyF3VRoJ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/M/cPjGav8GHvq/BNm8mREYWIV8m18wDwvj7ltkJgqHPC8LH95fK4fIKsNBvkifVC5dPIppngiyKrpekfCr0jQDwMZQ/v+FofQilwgqGlB/iGcbTDxLLJAbGGjrcKSHJrCUXRf4GwiTNfXVfCIbYY6K61LEnGX+f6NCfTcl/boT4WnxeEHKGwZXD5RWQb813RXq9ED/UfK4xpisgK5+KWe4leQCORS8YdKw9TjDE/BBkPP3pt/HuPoz8ZQvGAhu5ivwNHvR9CdFMh57di048K2gBEYNMOcPIyQvChL0jy+HyCghQ0VvT62X64XzBSMm3EdWDmUumABwUboYRxmHXxIvnR9B+ZyoQm2HM3tTV5G+ImdSXE0Qfq0tjzLl+NqU5Xaumrm6Fe3ImLX8GH38/QTCy8oIQfSJXDpdXQILJmZFYL9YPZwmGIeslN59Kf2kIBvg8svYw2CXaaDx9Midt8FXvYQvsiS0IRFDkb/B/Qd4Xm2DnXD+bsrjVl1NZtdei0w8PzaauFH8/f4bBle8Sn2EwV9QNrqlLp9fLYOsCgmEbFsu3EcmnYrDvDT6V8ufXib3unFSxVofcjHhSngnuOSluj2f7uGseYCcfsndyhl/bScivEM3f4NvO5xJn7Gzrqu207VE15KRK0adI8feTNr0z8oKQ/T5TDptXQIC8fbFe+PpdUjBU+TaiS4vYwwCfyfAehpXqwO+Vhu1TZzWJjhcfj6evHXaR9gTvYbgPbUIc/Ej+Bh9xqY3wm3U02Rbj9PwZQvz9tFNSSXlBgp9E8oIIeQV4onb6DicEg8snEcszITonmm+jM5/1m8EpKfCx2G96rzyPXj2mLOLgvxefOgzHehT4WNzQINZ4auktu3XPjSAO/luyzEvpxwJveoMPZoNYUsPkHU8RCEAsKQDeCAQfBAAAoAKCAQAAQAUEAwAAgIZ/RFVniSRqG90AAAAASUVORK5CYII=" alt="" /> VARCHAR这种数据类型对name,owner,species是不错的选择,因你它们的长度是变化不定的。 你可以任意指定从1~65535的值,如果你事先指定的短了,mysql有ALTER TABLE 命令
表示性别的方式有好几种,比如 f,m 或者 female ,male,最简洁的方式是 f ,m .

birth ,death 用DATE格式
当你创建数据表后,show tables就能有结果了 :

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAAB+CAIAAADnQmnbAAAG+klEQVR4nO2d27mrIBBGbUrbMc1Ea1FbMXZivpRwHkwQhEEwEnWftZ72MTgOw8/Ny5wsAwAAAAAAAAAAgF+Q34fn+HqOr2dzS2C+qPpXWyYwvBHRn8RxgCnE3wa3qPrXu53G1+NeqIMJRZbXj3G+6HN8Pcehylec9PizRxxAwBHcsnv2ta+9DIqqV8JaHv/BSFY2zqvbIDKbsns29TRCtOWtVT01rx96lzX+aYwoekDLRuvxpoCcwS2b13PswhRya0dn402NqlzShxndz/dVbDcC1eMsptVX1cLjj9sBw44RNDHO758iuuixlN1UgbKZIqI6ojFy6KGR+mLZaKsNa5SSzsrvw9oEpNl36Kz49JDFVSz/J38sx8omaCC0RZbfB3Vi2agmN/zJym7Ri5wqV0f0v71j3uVE1tf5XCWtbeb2MKaA/D64hp9bq2slWGTvwu5Ryl3SXDub05O6bl4/DCc/7uX141Pfx70In21XBjwhVsuwOOJgFtDcFuJ8RTwisxpG4dgoLRo1SmTT4jqiX97a8eVuVHXdpQOq2K0duzIrqqZrmzrPiqoPHUeXIlvsCbaJzLux+CsbUp/I3pH9dHqbouo/9TdFNk9P+pHvpkvzNLVGjBzJJpHldXsvymao8klz61giMzcie41kbrQ4XxKvyKa2fPRiM7jXQNOktvPC37qufySzeot2fGiboS2zrOweTfcIG0EtkekbEXFkNdapynN5Tearr1FmWvldZTL1i8zRh4wtj6EkNfL3dW42tjEdyJsDH+65KZNFlr3b3vJTU/atDZ6JHNOlWiCOQ1WqFYVZX3Pt6I6D+xQ5znMtTnUXejtb70LF3QODaP7OtsBeWoWCyNLxHtSvr7DPvmZrTRAZAAAAAAAAAKQg+KU8+C9IogdEBjqIDJKzqx7mp7zWm77GM2nt1j/H//Bxjx6+h5EMdJguITmIDJKDHgAAAAAAYBvyx5XwP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NmlJ2XgtGiczuMctWV0G5tWNXZkXVdG1T58E7l+9Fljln3j3zqLka/j0BKZsBInOWj7UTXd8Ag2FBjuFLkUkj2SSyvG7vRdkMVT5pbsNVtohMP/djbcc8aq6RLK8f4yJ/m7dTSeVj7ViOrdXX5fzCtV3X/lmWfS0y02lzZzS0zTD1zkfTBd5S2lVkhrUd86g5Q6HV3b7WtHEx4iyV99qJcEw6V5heDcd2W5PNWw/7DV0XssDV1s/YxZSNsnlr13dtZpKzuXysyEw71lS+Tx41x+7Sb8QhMrl8lDNb6qvvqX+yu4RN/NWX+xLMlbAdxx3/y7P/HX/4Ep5dAgAAAAAAAAAAAMDR/AOEvW8Pi/lyFQAAAABJRU5ErkJggg==" alt="" />

为了确认你的数据表是你想创建的样子,用DESCRIBE命令查看:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdAAAADSCAIAAAB1gAboAAAX/ElEQVR4nO2d3bWyOhCGaQrbwWbUBr4mwCZOAWone69dwrngL4EEkkiSiT7POhfncyPMhPA6DuG1av79VwEAQAIQXACARCC4AACJQHABABKB4AIAJCKN4NaX1+/P3+/P3297TnA4AACJpKxw68vrLcGtb89etVfaPQv6z9/vz9/zchr/cro+jK9XVXNfva5t/Pu41dO27d+v4dDW7e3xHEbTRtktAEQks+A2d1Wn9t5/e/7cm+Efp+tj1jiLlJ+uD7Mq1ZfX78/rWk//vF/rxfan62NZj6807nR9/HVNtd7+3Y8WBxBcgPJo/v1XNfff9tYXa11z7n7+BjGqb09FlfR/asXdKDpVtSgGdTE1ylDT/v3OMrqJJrhaPBaBO3d6bHuvawJdX16L+DcFV4vBU3D7/fQj/6d+ElTqeKqfLj/Ginvem8fHGAAkYxDcn7+u6a/t17WedGQlQHuC0rTKxb+qXm3vWtSbVhaCq4S3Fc9aW5f7MeywF+VFCblb4RrF14HT+Gk3vnccN3U8tbHdqnARXACpDIL7uNWzTCi6M4vmSlAMmnXuVN10FtxhY3PVqb5/U3B/zBX33KtVPwnsgmveSf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FwAgEQguAEAiEFwAgEQguAAAiShQcE/XR+ofdg6nXvx2eumcro/pp7kBwBNFcPtfuv/7/RG+Si6P4AYtvjt3q4f/mnZ8LtAtBcv25+4n08lq7tpDkADgziC49e0Z8FzwNxEguOu3NO2km6fr4++3Pe/uwbh906oPoacuOevLazdyADDQC66vmvQ/FFxfXqsiay6TpzpofX0qh1O331f86Yj6Dk/Xx1/XTEWfiwBZj7uuKOeDTv+5yE19ey4rwXOnxravlS7bn64Pl3Pnke/4h9mqY7V/PTAAcKT5999w/VymC2z/Who0qL9EZyHQLv768ho2aO6Li3kq0MJqpdW7ejUZwnbZp22bptWqSHWbgM+k5SHUL+OjHdHWZ4zT9oauhVMw/RFs+Tb37WlQ+tOZAHkYBXdxse006WYxraq53lnWdMrrj1s91sVjQTrux78haBTcWXRW+m7eg+G464py3sZTYkyFZx/YIJ2va62HvcZhe6XnsIVvvrvJ6hMAANyYK9z56tn/wmiumJZKNwnEufu5N9Xp2t679lbrd7otXQKvo3sLrvm4mgnmstgPENylmA5f0qd9Ogju5vb15eXWP5k2dsx3L7DKdZABQGOqcJULLFRwbRVuL7j1rbucmvZ1rXv9XeB0E8ly9BDBNR13K/EDKtzFncndHu7m9l5quwhsL9/9vjD3zQBCmG6aafeIXL6SG6437ULV77C/uvbVNVXV3J/t3bg01f0aPlRwtb0t+rbLzUJ3O6GO8+pY/U0/7aPIuv1ej9UxMFu+u60eergAIYzrcJW72I7fx83CNK8PVffTtJOUqP1i7da5w3H17fX9+AjuxnH1Pxluzb2zSmF7JwbBtWyvDPL610EOylddm8EqBYBjKPBJs2L41DKQfgJAIAhuTJzWbBUGT5oBBIPgxgUvBQCYQHABABKB4AIAJALBBQBIBIILAJAIBBcAIBEILgBAIhBcAIBEILgAAIlAcAEAEoHgAgAkAsEFAEgEggsAkAgEFwAgEQguAEAiEFwAgEQguAAAafgfXDkuqopGqnQAAAAASUVORK5CYII=" alt="" />

只要你愿意,DESCEIBE命令可随时调用。

3.3.3 Loading Data into a Table

加载数据

为了填充数据表,Load 或者Insert 都可以

因为刚建表,你可以将数据写入一个txt文件中,每一条数据之间用tab隔开,然后执行下面的语句导入数据:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdsAAACzCAIAAABOyCHgAAAZtElEQVR4nO2d348cx3HH59/ae1deBURA3v2yCPIWGIiDGIYDRHZgKNYe5UiBlMh2IEeyE0WEZXhjRw4jWpRESTz+Jo+85Y8jeSJFipRF20AAJ9LkYfdme7qrqqt7fnXPfj84EDs9PdU11dXf7ukd3hUlAACANCiEc9/83kvCvwAAANqFVuTX9w7+6I//5OTHD5948qlj+/efePKpny4+fuLJp3506dYTTz71dycvfffE2XMnXuvZVwAAGDeEIv/fl1++eO76tc9+t/vw8dn7v/ng7qPjdz79xc1Pji4+/pfLt14+f+Pp46efeefMkae/0r+7fTCfbm0vhnYCALCJEIp87/f/89rurb1Hjy89eHz63mfvHTw8duv+z6/f/fe9O69c3n/p7PW//q+PXj61m4ciL7a3pvOyLMtyPi1cpnPmRA1HoRfbW1BtAEDrEIr8wd1Hb+1/cvLGnXeu3z62tz+/fOPohcVrZ678YOfyCycvPPPOmT9/460f71zKQ5El9ZxPi5VaW8VetYUiAwC6gFDk1/cOPrz36PyDz3c++ez9u4/evn3/P27eO7o4eHX31ssXbh7ZWXz1Z78++8mjxoq82N5yFZEsVJ4VriIvMhR5sb3FrI+XNfjz3DIaAACCIRT5xXPXL336+Pi127+6uj+/fOONC4sfn7n6w53dF05enL17/m/e3vnTV39+8/7DfBSZo67IlV1jjUxr+Uqe23MEAADKsnQV+Q9ffPHiuetnH/zmw3uP3j349Nit+/Mb947uHby6e+v7F248f+b6t9+/+LX5iS++/JJS5KVirjdmDdFaF25tL2qbt+vlZa1wvr1VGZhPi2I6pS6ROVzaLs0QG8bsCXEPebq9vbW1vT2FJgMAWsVW5Buf//4nV+58eO/RL6/cfPPS9dfP77165sr3T11+4eTF2Ylz3/r16b+av/v1N//7s8ePOUVe6/B8akieue5clvrXyK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uQgI/pqmXbKBjIqRdasMVNT5Gg/LZdC49AWI1bkJjkTpJL6Ueato5mkQcqwz0dB5eah+6E374Wzrp/u5Vy1ssuc1jhAHrof3M9cHFp3nvQqF4Qs4u5FLtffvteO11rhoLEPkgW9pQJpDQDoAQiNB6wyAAC9Aa0BAIBUgCIDAEAqQJEBACAV/h/FKRdnF1C6rwAAAABJRU5ErkJggg==" alt="" />

mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;

我的这个文件在我桌面上:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnwAAABGCAIAAADZ8d7jAAAOZ0lEQVR4nO2d27XquBJFnZRJxyQDJHCSAJLoADZkAoMQ+sPG6FGrpLKFsGHNcT9uc7SlculRkixrNd2//xpCCCGEVIBBlxBCCKkEgy4hhBBSCQZdQgghpBIMuoQQQkglGHQJIYSQSjDoEkIIIZVg0CWEEEIqwaBLCCGEVIJBlxBCCKkEgy4hhBBSCQZdQgghpBIMuoQQQkglGHQJIYSQSjDoEkIIIZVg0CWEEEIqwaBLCCGEVKJO0G131/vtcb897sdtheJsdOf736H9tBUf4aP1stn/PQLPF7VHyH8O3fFx2W0KZVaAYvYY2/87/FDTt0urx2wKt+cFsNn/PU6d8A+LjhfzqbnSbXfXuU58R4BM5tkeLn0LsLSDMn27yoQgv166o+OHDFe8Os/tcb8FDoGDSIF2MlpbqtO2h8vtLI0PHyK2p2+lE1qLqY255U7qF7IJuLMUjpGz69FqT8H0+e3Z2k8n2CkQtIfb43677rWGBYPukF+hccBEjTnZh4OuNah8LOiOHTV3vvmVQbcn/9GmdZsFBt12d13U8ii2p91dL7vt/k8f5iQsbcwrd1K/kE2oFXTn1+Mqgu6Eogv6OTurXw663fl+POz/Hvfb49RtT+MMpT1c3KmK95+bPn3/P9dx3iQr3jyMnNgdH/f8uSccIFx7vNwce9DvqcEimB37bonzD5Z3wUwT2VPqeZvuLK4slXJnB92+8/Qtx5veopz17SPcTjIqK2297B81bGxP3pzd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97W3sZh38wMRhAf7kq5fevPL/fXvr79uluA8n1tOXNrbePAdAQBnsr7kto/31uthexvft0t7G6cXWKUTvNxfZioouzdR+k31/O38UMsd9QIv99e/obsOjNEPeV/7rXy96fJfSOfocON1UOvWPt4bVaXO55bDs3f+w5rAy4qLegUAAHXzt3Y926/J3x5z6lDW7ulyf/1zjEK6pz0xMvVQsvdQ66qp7/t2WCFlUud0vf6GrpzDHT04bqFOy8wpFX0RkTqfW47A3u7pj7LYlw/ALzG/LYakeNUnoOZ3SfN9WTn+erTzmGN+2Z/L4U9kO8PDWm0rGrlLcNzXfitfz2F2iFqk1Cr27dDHe6tX24Y6n1sO395NYzEDCcAPMXcf1yFg8sT9Nmr2y0u3dR0+z6653Pvn0D9affULMV/Eujs7PLjvqyVJN+epBOHB7LK/AXgpMyA8OM/nlsO2N6DAMCcDAGqANZftDg/U6GEKD+1juF26fry3U7QwYHxijRIeXPf1TalHGD20j7c6ONv0M3U+txyrYlv2uipvVA1fpwH4HdbuIGDlItE7aN2KvrpmHPpxevN990/nVoDwHidqeNBKM743mKdJi11QfGLfa/q0rnmeOt9bDqNi1LWbk3749gDAD/F2zahQ0F35dd0/oXSmXf/PNXmlLacJ6Hz18/VyOOHBc1/9T44P4HtWLvkLcYQH+nxWZST2quu1sHIJAABiUusrNmaWAABgJ45d08WDXdMAABAB5FwCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAk/AeGa3hv7PiinwAAAABJRU5ErkJggg==" alt="" />

如果你的编辑器中用的是\r\n来换行,那你应该用下面这条命令:
mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet
-> LINES TERMINATED BY '\r\n'; 在苹果上,你应该换成:TERMINATED BY '\r' 如果命令失败了,应该是你mysql安装时没有选择默认本地文件处理功能。 当你想一条一条输入时,Insert 命令就有用武之地了。
mysql> INSERT INTO pet
-> VALUES ('Puffball','Diane','hamster','f','1999-03-30',NULL); 字符串,日期,要用引号,空白用NULL

mysql 使用说明-1的更多相关文章

  1. MySQL使用说明

    一.概述 什么是数据库 ? 答:数据的仓库,如:在ATM的示例中我们创建了一个 db 目录,称其为数据库 什么是 MySQL.Oracle.SQLite.Access.MS SQL Server等 ? ...

  2. mysql 使用说明-3

    3.4 Getting Information About Databases and Tables 获取数据库和表格的信息 如果你忘记了数据库或者表格的名字怎么办?或者给定的表格的结构怎么办?(例如 ...

  3. mysql 使用说明-2

    3.3.4 Retrieving Information from a Table Select 命令从表格中取回信息 SELECT what_to_select FROM which_table W ...

  4. Navicat for MySQL使用手记

    摘要 在管理MySQL数据库的图形化工具中,最为熟知的就是phpMyAdmin和Mysql-Front了,今天跟大家分享另外一个管理mysql数据库的另外一个利器---Navicat MySQL. N ...

  5. java 的sigola orm 的开发,第一次学写java,可以用在play上面

    当然还是开源:https://github.com/xiaose1205/sigola     初学者有用,高手可以给点建议,勿喷啊.net转java,有些思想还没有那么快转.希望得到大家的支持啊 使 ...

  6. zabbix-2.2.2(Ubuntu 14.04 LTS/OpenLogic 7.2)

    平台: arm 类型: ARM 模板 软件包: apache-2.4.7 mariadb-5.5.50 mysql-5.5.52-0ubuntu0.14.04.1 php-5.4.16 php-5.5 ...

  7. MySQL内存----使用说明全局缓存+线程缓存) 转

    MySQL内存使用说明(全局缓存+线程缓存) 首先我们来看一个公式,MySQL中内存分为全局内存和线程内存两大部分(其实并不全部,只是影响比较大的 部分): per_thread_buffers=(r ...

  8. MySQL在线DDL gh-ost 使用说明

    背景: 作为一个DBA,大表的DDL的变更大部分都是使用Percona的pt-online-schema-change,本文说明下另一种工具gh-ost的使用:不依赖于触发器,是因为他是通过模拟从库, ...

  9. (转)mysql帮助命令使用说明

    https://www.ilanni.com/?p=8157------- 烂泥:mysql帮助命令使用说明

随机推荐

  1. AndroidStudio 应用(一)

    1.下载安装,用上vpn了都: 2.配置模拟器,出现问题:VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_V ...

  2. [extjs] ExtJS4 treepanel 子节点选中父节点自动选中,选中父节点 子节点自动全部选中

    ExtJS4 treepanel 主要添加viewConfig重的代码: xtype:'treepanel', store: menuStore, id:'menuTreePanel', viewCo ...

  3. [mysql] mysql 5.6.27 innodb 相关参数

    mysql> show variables like '%innodb%';+------------------------------------------+--------------- ...

  4. 用java给html文件添加必要的控制html代码片

    这个需求,我估计很多时候都不会用到,但是,我们目前在做一个CMS的系统,在创建页面的时候,需要控制页面各个板块显示的内容来源,这个不是关键,关键是页面内容配置完毕后,如何提交内容,也就是说如何和后台系 ...

  5. jQuery点击图片弹出放大可拖动图片查看

    CSS代码: .popup-bigic { position: absolute; ; ; background: #eee; overflow: hidden; ; } .popup-bigic . ...

  6. OpenSSL 双向认证

    在使用OpenSSL进行SSL双向认证时,需要在服务器和客户端配置如下接口函数: SSL_CTX_set_verify(SSL_CTX* ctx,int mode,int (*verify_callb ...

  7. (转)ORACLE触发器详解

    本文转载自:http://blog.csdn.net/indexman/article/details/8023740/ ORACLE PL/SQL编程之八: 把触发器说透 本篇主要内容如下: 8.1 ...

  8. bzoj1536: [POI2005]Akc- Special Forces Manoeuvres

    Description 在一次军事行动中有一批空降兵要降落在沙漠中拆除炸弹. 空降兵按照预定的顺序跳伞并降落到指定的位置.一旦降落他们便呆在原地不动了. 每个空降兵都有一个生存半径. 如果炸弹与他的距 ...

  9. bzoj4561: [JLoi2016]圆的异或并

    Description 在平面直角坐标系中给定N个圆.已知这些圆两两没有交点,即两圆的关系只存在相离和包含.求这些圆的异或面 积并.异或面积并为:当一片区域在奇数个圆内则计算其面积,当一片区域在偶数个 ...

  10. nginx的https配置

    测试自签名的ssl证书 首先执行如下命令生成一个key openssl genrsa -des3 - 然后他会要求你输入这个key文件的密码.不推荐输入.因为以后要给nginx使用.每次reload ...