Discuz Info Mysql Query Error 1046
Contents |
获赠金笔:0支 赠出金笔:0支 荣誉徽章: 相关博文 更多>> 推荐博文 让出租车司机别再“疲于奔命” no database selected mysql php 从社交到服务,支付宝「到位」新 20160930【早评】九月收 20160930【解盘】站稳3 台湾科技挣扎,人祸大于天灾?
No Database Selected Mysql Error
收入份额=市场份额,虎嗅想干什 传奇的谢幕,谈岩田聪和他的任天 家常主食轻松做之——培根香葱花 企业要么拥有平台、改变世界,要 盘点2015最惊艳流行的婚礼蛋 查看更多>> 谁看过这篇博文 加载中… #1046 - no database selected phpmyadmin 正文 字体大小:大 中 小 DZ论坛:MySQLQueryErrorErrno:1046错误的解决办法 (2013-03-18 13:57:11)转载▼ 标签: 1046错误 dz论坛 it 分类: error 1046 (3d000) no database selected grant 数据库 discuz 论坛转移的时候,点进后台UCenter时提示如下: UCenter info: MySQL Query Error SQL:SELECT value FROM [Table]vars WHERE name='noteexists' Error:No database selected Errno:1046 解决办法: 打开config.inc.php文件,找到define('UC_DBTABLEPRE', 'pre_ucenter_'); 默认的语句是 define('UC_DBTABLEPRE', 'pre_ucenter_'); 改成这样的格式
Error Code 1046 In Mysql Workbench
define('UC_DBTABLEPRE','`dbname`.pre_ucenter_'); dbname为新的数据库名 这样保存即可 分享: 喜欢 0 赠金笔 阅读┊ 评论 ┊ 收藏 ┊转载 ┊ 喜欢▼ ┊打印┊举报 已投稿到: 排行榜 加载中,请稍候...... 前一篇:win2008+IIS7.5配置伪静态的方法 后一篇:开启SqlServer2005的1433端口和进行远程连接的方法 评论 重要提示:警惕虚假中奖信息 [发评论] 评论加载中,请稍候... 发评论 登录名: 密码: 找回密码 注册 记住登录状态昵称: 分享到微博 评论并转载此博文 匿名评论 发评论 以上网友发言只代表其个人观点,不代表新浪网的观点或立场。 <前一篇win2008+IIS7.5配置伪静态的方法 后一篇>开启SqlServer2005的1433端口和进行远程连接的方法 新浪BLOG意见反馈留言板 不良信息反馈 电话:4006900000 提示音后按1键(按当地市话标准计费) 欢迎批评指正 新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑 Copyright © 1996 - 2016 SINA Corporation, All Rights Reserved 新浪公司 版权所有
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting #1046 - no database selected wordpress ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join error 1046 (3d000) at line 22: no database selected the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a
No Database Selected Mysql Command Line
minute: Sign up Error 1046 No database Selected, how to resolve? up vote 136 down vote favorite 22 Error SQL query: -- -- Database: `work` -- -- -------------------------------------------------------- -- -- Table structure for table `administrators` -- CREATE TABLE IF NOT http://blog.sina.com.cn/s/blog_a14091490101b2er.html EXISTS `administrators` ( `user_id` varchar( 30 ) NOT NULL , `password` varchar( 30 ) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = latin1; MySQL said: #1046 - No database selected need some help here. sql mysql mysql-error-1046 share|improve this question edited Oct 23 '10 at 18:21 OMG Ponies 198k36356415 asked Oct 23 '10 at 18:19 steph 687253 5 In case anyone is interested, you can also specify the database name via the CLI command without editing the import file. mysql http://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve -u root -p databasename < import.sql –Sam Dufel Nov 24 '14 at 15:36 what happened to me was: create a schema, filled in the name of the database, then it says "fail, no database selected". reopen workbench, i see database that i have just failed to created. Then I choose the database that i have just created, and open a .sql file and run, with both create database and use database statements, it complains "fail no database selected" again. reopen workbench, the tables are all built. MAC system, workbench 6.3.3 –Tiina Jun 9 at 9:12 add a comment| 13 Answers 13 active oldest votes up vote 212 down vote You need to tell MySQL which database to use: USE database_name; before you create a table. In case the database does not exist, you need to create it as: CREATE DATABASE database_name; followed by: USE database_name; share|improve this answer edited Feb 24 '13 at 0:02 Piero 2,881946102 answered Oct 23 '10 at 18:21 codaddict 250k50362442 2 In my case, I had used mysqldump to export a database and was running into this upon import. I just had to edit the exported sql file to add these two commands to the top of it. –bh5k Oct 11 '12 at 17:01 Thanks! This is what I needed. I had a script to create my database and tables but the tables weren't getting created because I needed to insert the USE tablename