mysql咋用啊?

stanely 2004-04-03 05:05:38
1、安装以后怎么用啊?怎么说连不上?

2、在"odbc数据源"里面也看不到她的驱动阿(我用的phpmyadmin)?
源码如下:

<?php
/* $Id: index.php,v 2.2 2003/11/26 22:52:24 rabus Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:


/**
* Gets core libraries and defines some variables
*/
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');

// Gets the default font sizes
PMA_setFontSizes();

// Gets the host name
// loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
if (empty($HTTP_HOST)) {
if (!empty($_ENV) && isset($_ENV['HTTP_HOST'])) {
$HTTP_HOST = $_ENV['HTTP_HOST'];
}
else if (@getenv('HTTP_HOST')) {
$HTTP_HOST = getenv('HTTP_HOST');
}
else {
$HTTP_HOST = '';
}
}


/**
* Defines the frameset
*/
// loic1: If left light mode -> urldecode the db name
if (isset($lightm_db)) {
// no longer urlencoded because of html entities in the db name
// $db = urldecode($lightm_db);
$db = $lightm_db;
unset($lightm_db);
}
$url_query = PMA_generate_common_url(isset($db) ? $db : '');

header('Content-Type: text/html; charset=' . $GLOBALS['charset']);

require_once('./libraries/relation.lib.php');
$cfgRelation = PMA_getRelationsParam();

if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
PMA_purgeHistory($cfg['Server']['user']);
}

$phpmain_hash = md5($cfg['PmaAbsoluteUri']);
$phpmain_hash_js = time();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>" dir="<?php echo $text_dir; ?>">
<head>
<title>phpMyAdmin <?php echo PMA_VERSION; ?> - <?php echo $HTTP_HOST; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?lang=<?php echo $lang; ?>&js_frame=right" />
</head>

<?php
if ($cfg['QueryFrame']) {

if ($cfg['QueryFrameJS']) {
echo '<script type="text/javascript">' . "\n";
echo '<!--' . "\n";
echo ' document.writeln(\'<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">\');' . "\n";
echo ' document.writeln(\' <frameset rows="*, 50" framespacing="0" frameborder="0" border="0">\');' . "\n";
echo ' document.writeln(\' <frame src="left.php?' . $url_query . '&hash=' . $phpmain_hash . $phpmain_hash_js . '" name="nav" frameborder="0" />\');' . "\n";
echo ' document.writeln(\' <frame src="queryframe.php?' . $url_query . '&hash=' . $phpmain_hash . $phpmain_hash_js . '" name="queryframe" frameborder="0" scrolling="no" />\');' . "\n";
echo ' document.writeln(\' </frameset>\');' . "\n";
echo ' document.writeln(\' <frame src="' . (empty($db) ? $cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . $phpmain_hash_js . '" border="0" frameborder="0" />\');' . "\n";
echo ' document.writeln(\' <noframes>\');' . "\n";
echo ' document.writeln(\' <body bgcolor="#FFFFFF">\');' . "\n";
echo ' document.writeln(\' <p>' . str_replace("'", "\'", $strNoFrames) . '</p>\');' . "\n";
echo ' document.writeln(\' </body>\');' . "\n";
echo ' document.writeln(\' </noframes>\');' . "\n";
echo ' document.writeln(\'</frameset>\');' . "\n";
echo '//-->' . "\n";
echo '</script>' . "\n";
echo "\n";
echo '<noscript>' . "\n";
}

echo '<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">' . "\n";
echo ' <frameset rows="*, 50" framespacing="0" frameborder="0" border="0">' . "\n";
echo ' <frame src="left.php?' . $url_query . '&hash=' . $phpmain_hash . '" name="nav" frameborder="0" />' . "\n";
echo ' <frame src="queryframe.php?' . $url_query . '&hash=' . $phpmain_hash . '" name="queryframe" frameborder="0" scrolling="no" />' . "\n";
echo ' </frameset>' . "\n";
echo ' <frame src="' . (empty($db) ? $cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . '" frameborder="0" />' . "\n";

} else {

echo '<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">' . "\n";
echo ' <frame src="left.php?' . $url_query . '&hash=' . $phpmain_hash . '" name="nav" frameborder="0" />' . "\n";
echo ' <frame src="' . (empty($db) ? $cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . '" frameborder="1" />' . "\n";

}
?>

<noframes>
<body bgcolor="#FFFFFF">
<p><?php echo $strNoFrames; ?></p>
</body>
</noframes>
</frameset>
<?php
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
echo '</noscript>' . "\n";
}
?>

</html>


3、phpmyadmin这个东西不太方便,有没有免费的类似access那样可以管理数据库的?

4、请吧mysql怎么使用,详细给我讲讲

谢谢!


...全文
259 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
lehool 2004-04-09
  • 打赏
  • 举报
回复
建议运行 winmysqladmin.exe
先停止服务.
然后删除服务.
在winmysqladmin.exe 的my.ini 页面下修改 所有的路径
再将所有文件移动到 D 盘.
然后再运行 winmysqladmin.exe 就OK了.
所有的操作可以使用 winmysqladmin.exe 所提供的菜单进行.
stanely 2004-04-09
  • 打赏
  • 举报
回复
我知道了,我把mysql安装到c:下才可以,到d:下就会出上面的问题。

但是,使用phpmyadmin的时候有这样的错误:
#1045 - Access denied for user: 'root@localhost' (Using password: YES)
是不是config.inc.php里面的设置出了问题?这里面有三个root阿,怎么设置?

谢谢!
lehool 2004-04-09
  • 打赏
  • 举报
回复
root@localhost //本地主机以root身份连接MySQL服务器
root@% //任何远程主机主机以root身份连接MySQL服务器
这两个有吧,还有就的话是你自己设置的了。
那各不要就删除,删除语句见上面!
lehool 2004-04-09
  • 打赏
  • 举报
回复
不用密码,试试!
stanely 2004-04-09
  • 打赏
  • 举报
回复
谢谢lehool,还有一点:

#1045 - Access denied for user: 'root@localhost' (Using password: YES)
是不是config.inc.php里面的设置出了问题?这里面有三个root阿,怎么设置?
stanely 2004-04-08
  • 打赏
  • 举报
回复
不好使阿。。。
lehool 2004-04-06
  • 打赏
  • 举报
回复
1.在MySQL 3.23之后(包括3.23),MyISAM是缺省表格类型,它是基于ISAM代码并且有很多有用的扩展。数据表定义存储在一个有.frm扩展名的文件,索引存储在一个有.MYI(MYindex)扩展名的文件并且数据存储在有.MYD(MYData)扩展名的文件中。移植或备份时可直接拷贝来实现。
2.ISAM在MySQL 3.23之后(包括3.23)已经被MyISAM取代了。相同硬件特性时移植或备份时可直接拷贝来实现。
3.其他格式merge(是MyISAM的复合表,移植或备份时取决于各个MyISAM文件),heap(存储在内存中,HEAP作为临时表很可用),bdb(只能用工具,不可直拷),innodb() 用的比较少,就不详述了。
//在哪找到这些文件?--winmysqladmin.exe 的my.ini setup中datadir=C:/mysql/data其中datadir即为数据库路径。当然,你要更改数据库路径也是更改这个选项来实现,该后别忘了保存!
//要是想在本地调试好以后放在虚拟主机空间上,除了上传数据库文件还需要干什么?--其实只要把数据库文件上传到相应的C:/mysql/data(是具体情况而定)中就行了。注意:拷贝数据时先把MySQL的服务停了(C:/net stop mysql)再拷贝数据,这样可以保证数据的一致性。拷完了别忘了(C:/net start mysql开启服务)。如果拷贝数据时要求服务不能中断的话,用mysql的最常见的mysqldump可制作整个数据库的一个备份:
mysqldump --opt database > backup-file.sql
或EMS MySQL Manager
stanely 2004-04-06
  • 打赏
  • 举报
回复
运行了winmysqladmin.exe并且设置了密码用户名,还是不可以阿:

1、错误还是10061,让检查用户名和密码是不是错误。

2、在database选项卡上database列表匡中点右键,只有那4个用flush打头的菜单项目,没有象自带帮助文件里面说的还有create table之类的项目阿。

3、点start service以后除了问是否真的启动service没什么反映,start service这个项目还能够继续被点。server选项卡上面列表是空的。

4、你说的绿灯亮是什么意思?一共有三个灯,都在亮阿。
stanely 2004-04-06
  • 打赏
  • 举报
回复
mysql有数据库文件的概念吗(像access的*.mdb)?是不是随便建立?我要是想在本地调试好以后放在虚拟主机空间上,除了上传数据库文件还需要干什么?

在哪找到这些文件?
lehool 2004-04-06
  • 打赏
  • 举报
回复
你可以联系我MSN:lehool@hotmail.com
lehool 2004-04-06
  • 打赏
  • 举报
回复
在Windows下用MySQL时winmysqladmin.exe中设置的密码和用户名,并不是数据库的用户名密码。
--------------------------------------------------------------------
root@localhost //本地主机以root身份连接MySQL服务器
root@% //任何远程主机主机以root身份连接MySQL服务器
@localhost //本地主机以匿名身份连接MySQL服务器
@% //任何远程主机主机以匿名身份连接MySQL服务器
在Windows中的 @localhost 也拥有与root同等的权限,建议设密码或收回权限或干脆删除!
你的情况可能是没设置密码
Windows中:
C:\>mysql -u root
mysql>set password for 'root'@'localhost' = password('********');
mysql>set password for 'root'@'%' = password('********');//其他用户类似
删除用户:
%mysql -p -u root//一定的是root用户进
enter password:*******
mysql>use mysql;
mysql> delete from user where user='';
mysql> delete from db where user='';
mysql> flush privileges;//重新加载权限表
当然也可以修改权限或加密码
推荐用EMS MySQL Manager 2.5以上有中文版,也不用记这么多命令!
原贴http://expert.csdn.net/Expert/topic/2781/2781568.xml?temp=.5064661
lehool 2004-04-05
  • 打赏
  • 举报
回复
你的mysql没有运行!
运行 winmysqladmin.exe
当他的图标显示为绿色时就可以了
然后再执行mysql的其他操作。
stanely 2004-04-04
  • 打赏
  • 举报
回复
错误是:
2003 can't connect to mysql server <10061>
stanely 2004-04-04
  • 打赏
  • 举报
回复
php操作mysql的时候一定要通过odbc?象asp一样调用ado不行吗?

我安装了mysql4.0.18,它的odbc驱动在哪找阿?
lehool 2004-04-03
  • 打赏
  • 举报
回复
1 连不上时报什么错误?多半是因为没设置密码
2 odbc驱动你没装,去这里下载http://www.mysql.com/downloads/api-myodbc-3.51.html
3 EMS MySQL Manager 2比较好用,你搜索一下现在有中文版了!
4 你还是从网上找些教材,我一般在这里下载http://www.chinaz.com/download/。
stanely 2004-04-03
  • 打赏
  • 举报
回复
?
xingjiaren 2004-04-03
  • 打赏
  • 举报
回复
up

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧