LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1149|回复: 5

大家 我是个新手 想请教关于启动 Mysql的问题

[复制链接]
发表于 2007-1-30 17:37:09 | 显示全部楼层 |阅读模式
我刚刚学用linux(fc6)在启动mysql时碰到一个问题
如下

[root@U117 ~]# /etc/init.d/mysqld start
初始化 MySQL 数据库: Neither host 'U113' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
                                                           [失败]

不知道怎么才能正常启动  原先(出问题时)hostname是U117  后来该了U113还是有问题
 楼主| 发表于 2007-1-30 18:43:52 | 显示全部楼层
我改了

/etc/sysconfig/network 中的 hostname 为U113

可是/etc/hosts  不知道怎么改  如下::
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1        localhost.localdomain        localhost   
该如何改呢 !!

相关信息
[root@U113 ~]# resolveip localhost
resolveip: Unable to find hostid for 'localhost': host not found
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-30 19:24:41 | 显示全部楼层

解决了

用了一下google. 看了一下/etc/hosts  怎么设定  原来回路地址没设

原来系统自设的是
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
改成 就能正常启动了
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost


不知道/etc/hosts 还有什么其他用途  和 与那些程序有关
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-31 16:12:24 | 显示全部楼层

想请各位指导一下 (mysql)

想请各位指导一下

各位前辈
我是个新手 刚刚接触 mysql  用的是f6  os   这几天碰到一个问题 一直无法解决  想请各位指导一下

我创建一个新的表 时候 会碰到以下错误

mysql> CREATA TABLE newtabale1 (member_id int(11) NOT NULL auto_increment,fname varchar(50) NOT NULL, lanme varchar(50) NOT NULL, tel varchar(15), email varcha(50)NOT NULL, PRIMARY KEY (member_id));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATA TABLE newtabale1 (member_id int(11) NOT NULL auto_increment,fname varchar' at line 1

不知道该如何解决 请指导

Z注:
[root@U113 ~]# mysql -VERSION
mysql  Ver 14.12 Distrib 5.0.27, for redhat-linux-gnu (i686) using readline 5.0
回复 支持 反对

使用道具 举报

发表于 2007-1-31 23:19:17 | 显示全部楼层
应该是 CREATE,而不是 CREATA
email varcha(50),不应该用中文括号
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-1 16:50:03 | 显示全部楼层
谢谢楼上的前辈  我还是不很习惯 mysql书写习惯
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表