Tag Info

Hot answers tagged

7

I stumbled upon this question when I myself had encountered this error. I could finally figure out the configuration. I didn't touch anything in /etc/mysql/my.cnf which already has bind_address = 127.0.0.1. So only localhost can connect. I use OpenSSH server. So in its config file /etc/ssh/sshd_config I changed from no to yes the param responsible for TCP ...


5

I think the TCP/IP over SSH approach works by establishing a "normal" SSH connection underlying the MySQL connection (in the same way as you would tunnel using -L with the OpenSSH command-line client). Therefore, you'd need to specify a connection to an SSH server on server via which you're establishing the tunnel. Here, you seem to be using ...


5

You will get this message if you're trying to add a constraint with a name that's already used somewhere else. According to this post you can check your constraint like this: If the table you're trying to create includes a foreign key constraint, and you've provided your own name for that constraint, remember that it must be unique within the database. Run ...


5

It is a very poor practice to expect to maintain the PK/FK relationships from the application. In any db that is nontrivial, data has close to a 100% chance of being changed from other sources including ad hoc queries, data imports, etc. It is irresponsible to think the data in the database is protected because the application has protections. Sure you think ...


5

BOOL and BOOLEAN are synonyms of TINYINT in MySQL. See MySQL docs: Numeric Type Overview You probably want to use the BIT datatype.


4

You will need to give root@localhost a password Since you just installed mysql, you are running with default settings, this means you have no my.cnf. You will have to create one. Run the following at a DIS Prompt cd C:\Program Files\MySQL\MySQL Server 5.5 dir *.ini There, you will see sample .ini files. Let's pick my-small.ini net stop mysql cd ...


4

http://code-remind.blogspot.com.au/2011/12/on-macbookpro-10.html NOTE: Where the author suggests using the path '/Applications/MAMP/bin/stoptMysql.sh' at the end... there's a typo. Should be '/Applications/MAMP/bin/stopMysql.sh'


4

You many need to take a look at the comprehensive list of all Server Variables. Some of them you can change for the duration of your session, some you may change with the SET GLOBAL command, and other options may require a restart of MySQL. Here is the list of all options. This will also show which options can be used in option files.


4

Believe it or not, although the products went EOL December 18, 2009, the last versions of MySQL Query Browser and MySQL Administrator are still available for download for free. Hey, I still use them today. Click here and get it while Oracle isn't looking ... QUICK !!!


4

From the MySQL Workbench 5.2 window, select Database -> Synchronize model which will allow you to synchronize the model (EER diagram) with the database (you need to create a saved connection) for it. I recommend this method over just reverse engineering the model from the database since it maintains the layout of the EER diagram. One caveat is that you ...


4

What idexes do you have on this table? If the dbms engine is doing a full table scan, it will completely load a cpu and take a long time. If you have a 2 cpu system and all your data is in RAM, then you'll see 50% cpu usage. Please create and index, such as CREATE INDEX BlueBoxEngineDB.TransferIdx1 ON BlueBoxEngineDB.Transfer(Amount,FromUserId,Status); ...


4

You can use the INFORMATION_SCHEMA database and the COLUMNS table in particular Example of use: SELECT table_name, column_name, data_type, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'myDatabase' --- the database you want to search AND column_name = 'name' ; --- or: column_name LIKE '%name%' ...


3

No worries my friend! Your database was not compromised. The systems administrator had this problem as well this week. We found out after he cursed across the room! After sending a call to our hosting provider, Heroku, it turned out that they were doing a test on a selected amount of machines (most likely on their Cedar stack) and created test schemas as a ...


3

I see a few issues with your existing code to create the waiters table. First, the index creation code is incorrect. The column to be indexed should be inside the parentheses -- INDEX (manager_id). Second, you are trying to add an index on a column that is not listed in your waiters table. You need to include the manager_id as a column. Third, the ...


2

You may need to check the users in the mysql.user table. Run this query: SELECT user,host FROM mysql.user; You should see something like this: mysql> SELECT user,host,password FROM mysql.user; +------------------+-------------+-------------------------------------------+ | user | host | password | ...


2

I have some queries you can run against the INFORMATION_SCHEMA Run this to get the Total MySQL Data and Index Usage By Storage Engine SELECT IFNULL(B.engine,'Total') "Storage Engine", CONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),',',''),17,' '),' ', SUBSTR(' KMGTP',pw+1,1),'B') "Data Size", CONCAT(LPAD(REPLACE( ...


2

To be frank, if you are using a GUI tool as your backup strategy, you are doing it wrong. Backups need to be scripted, automated, and regularly tested or else you might as well not have them. If your database is very small (a few gigabytes), there is no point in doing incremental backups: backup the entire database with mysqldump and use binary logs in ...


2

Not having worked much in MySQL Workbench, your question prompted me to downloaded it to look around. It looks to me that the export panel is just a GUI to issue a mysqldump command. mysqldump is a program that can only be used to get a snapshot of the current state of the database. Aka, there is no comparison feature to get 'latest changes since the last ...


2

There are big differences between the two. The datatypes are different (e.g. Oracle doesn't have the ENGINE part, int(5) is invalid for Oracle, LONGTEXT is invalid for Oracle and so on) and part of the syntax as well. Oracle does not have an "autoincrement" column. It has a different concept using sequences. If you want to find all the differences you will ...


2

It looks like you are creating a New Server Instance Profile, not a New Server Instance. If you installed MySQL already, then go to the DOS Prompt and run C:\> net start mysql or Click Start Click Control Panel Click Administrative Tools Double Click Services Right Click on MySQL and Choose Start Service To verify that MySQL is running on the ...


2

Thanks Mika, I tried your solution in workbench (5.2.41). It worked after I cleared the passwords in the vault (click Manage Connections) and restarted the WorkBench. To clear passwords stored in the vault, I did the following: Open MySQL WorkBench the you will see the home page Click Manage Connection at bottom left corner. In Manage DB Connections, ...


2

According to the MySQL Documentation, the steps for the Migration Wizard should be Connecting to the databases Schemata Retrieval and Selection Reverse Engineering Object Selection Migration Manual Editing Target Creation Options Schema Creation Create Target Results Data Migration Setup Bulk Data Transfer Migration Report Sounds like you got to Step 9. ...


2

You can do this with normal DML/DDL. Create a table with comments: mysql> create table testcomments ( -> col1 integer comment 'comment on integer column', -> col2 varchar(20) comment 'comment on varchat col'); Query OK, 0 rows affected (0.01 sec) Select the information from the data dictionary (documentation link): mysql> select ...


2

The pt-mysql-summary tool from Percona toolkit gives you a very nice overview of your running server. It will tell you stuff like what the major config params are set to, what technologies ara available in your server, take a 10 second status sample, analyze your schema etc. Also worth to run pt-duplicate-key-checker at least once, to detect redundant ...


2

To expand on @ypercube's answer (He gets a +1), if you do not know which database the table resides, do this: SELECT table_schema, table_name, column_name, data_type, ordinal_position FROM INFORMATION_SCHEMA.COLUMNS WHERE column_name = 'name' ; --- or: column_name LIKE '%name%'


2

Assuming you're not trying to keep track of threads of messages, I.E. you send a message to N people, and they can't reply: 1) user needs no references to other tables 2) a message should have an ID (obviously) and a reference to the user who sent it originally 3) you need a table that connects a single message and its recipients (users) that looks like ...


2

The error appears due to a corrupted configuration file or some dummy MySQL services (Leftovers from server installations not completely removed, this is due to the auto-detect mysql services functionality). Please make sure you're running the latest Notifier version available (that can be downloaded at mysql downloads page). How to solve the corrupted file ...


2

You can use this Python Script in the Scripting Shell of MySQL Workbench. It is an improved version of the script found here: http://mysqlworkbench.org/2012/06/mysql-workbench-script-for-adding-columns-to-all-tables-in-a-model/ # define your columns and types here columns_types = {"created_at" : "DATETIME", "updated_at" : "DATETIME"} # tables you want to ...


2

If you just want to see the data in a table then do a select for that table in a query editor. That's the most basic operation wrt SQL. Using the table search with some "mysterious query" certainly does not help to accomplish that task. Search is, as the name implies, a search. Put the value you are looking for in the search field and let MySQL Workbench do ...


2

There's nothing wrong with your model. Au contraire - it's pretty advanced! employment_statuses provide data in a time-lined, historical, fashion, whilst departments identifies the actual manager. These entities are very different both in purpose and use (queries on employment_statuses will serve different scenarios than those on manager). I have to ...



Only top voted, non community-wiki answers of a minimum length are eligible