Mysql Error Code 1046
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 no database selected mysql php more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error 1046 no database selected phpmyadmin Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you,
Error 1046 (3d000) No Database Selected Grant
helping each other. Join them; it only takes a minute: Sign up Error Code 1046: No database Selected up vote 0 down vote favorite I wrote a stored procedure (sp_archivev3) on MySQl Workbench which is as follows. Basically,No Database Selected Mysql Workbench Import
Inserting values from one database to another. -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`MailMe`@`%` PROCEDURE `sp_archivev3`() BEGIN INSERT INTO send.sgev3_archive(a_bi, b_vc, c_int, d_int, e_vc, f_vc, g_vc, h_vc, i_dt, j_vc, k_vc, l_vc, m_dt, n_vch, o_bit) SELECT a_bi, b_vc, c_int, d_int, e_vc, f_vc, g_vc, h_vc, i_dt, j_vc, k_vc, l_vc, m_dt, n_vch, o_bit FROM send.sgev3 WHERE m_dt BETWEEN '2014-06-09' no database selected mysql command line AND CURDATE(); END When I run call sp_archivev3(); , I get an error with an error code 1046: No database selected SELECT the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. Please let me know what's wrong with my stored procedure. mysql stored-procedures share|improve this question asked Jun 12 '14 at 17:35 rocky 1101312 Is send the DB name or the table name? DB name should come first –Eran Jun 12 '14 at 17:43 send is a db name. –rocky Jun 12 '14 at 17:47 Then are you trying to copy data between different tables in the same DB? –Eran Jun 12 '14 at 17:49 Yes, that's correct. –rocky Jun 12 '14 at 17:53 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted The problem is that MySQL doesn't know which procedure named sp_archivev3 is supposed to be executed; MySQL doesn't know which database to look in. (Stored programs are objects in a specific database, just like tables are objects in a specific database.) Either specify the current database with USE statement: use mydatabase; call sp_archivev3(); or qualify the procedure with the name of database: call mydatabase.sp_archivev3(); share|improve this answer answered Jun 12 '14 at 17:55 spencer7593 61.1k75073 Thanks. That's a siτη γλώσσα σας. Κλείσιμο Μάθετε περισσότερα View this message in English Το YouTube εμφανίζεται
#1046 - No Database Selected Wordpress
στα Ελληνικά. Μπορείτε να αλλάξετε no database selected mysqli αυτή την προτίμηση παρακάτω. Learn more You're viewing YouTube #1044 - access denied for user in Greek. You can change this preference below. Κλείσιμο Ναι, θέλω να τη κρατήσω http://stackoverflow.com/questions/24190575/error-code-1046-no-database-selected Αναίρεση Κλείσιμο Αυτό το βίντεο δεν είναι διαθέσιμο. Ουρά παρακολούθησηςΟυράΟυρά παρακολούθησηςΟυρά Κατάργηση όλωνΑποσύνδεση Φόρτωση... Ουρά παρακολούθησης Ουρά __count__/__total__ Fix #1046 - No database selected itcs program ΕγγραφήΕγγραφήκατεΚατάργηση εγγραφής272272 Φόρτωση... https://www.youtube.com/watch?v=ZciWnmcf7fU Φόρτωση... Σε λειτουργία... Προσθήκη σε... Θέλετε να το δείτε ξανά αργότερα; Συνδεθείτε για να προσθέσετε το βίντεο σε playlist. Σύνδεση Κοινή χρήση Περισσότερα Αναφορά Θέλετε να αναφέρετε το βίντεο; Συνδεθείτε για να αναφέρετε ακατάλληλο περιεχόμενο. Σύνδεση 23.455 προβολές 74 Σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 75 7 Δεν σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 8 Φόρτωση... Φόρτωση... Φόρτωση... Η δυνατότητα αξιολόγησης είναι διαθέσιμη όταν το βίντεο είναι ενοικιασμένο. Αυτή ηa Bug Impact on me: None Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical) Version:5.2.34 OS:Any Assigned to: View Add Comment Files Developer Edit Submission View Progress Log Contributions [11 Jul 2011 15:22] carlos https://bugs.mysql.com/bug.php?id=61821 villa Description: Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. How to repeat: ror Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. [11 Jul 2011 15:24] Valerii Kravchuk Do you use MySQL Workbench? What exact version of it, no database 5.2.x? [11 Jul 2011 15:39] Miguel Solorzano Not repeatable with 5.2.34. [11 Aug 2011 23:01] Bugs System No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [8 Dec 2011 8:05] bruce deng Error Code: 1046. no database selected No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. i got this error in the MySQL Workbench 5.2.34 CE Revision 7780 [8 Dec 2011 17:41] Valerii Kravchuk All reporters: Please, check if this problem still happens with a newer version, 5.2.36. [9 Jan 2012 7:00] Bugs System No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [28 Jan 2012 16:00] Tolulope Eribake You need to specify a default schema for the error not to appear. [23 Sep 2012 23:05] scott markowitz 15:36:46 show index from tblprojects Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. 0.000 sec Not sure why this error is appearing. the db name is specified in the create table ddl. [24 Oct 2012 17:39] Miyuki Chan Right click the schema and make it the default schema. Then try executing it. [1 Mar 2013 21:55] Felipe Velasco I have reproduced t