Top "Mysql" questions

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).

How to connect from windows command prompt to mysql command line

I'm trying to connect to mysql server command line from my windows prompt I write the next line in cmd …

mysql windows command-prompt
How to do a regular expression replace in MySQL?

I have a table with ~500k rows; varchar(255) UTF8 column filename contains a file name; I'm trying to strip out …

mysql regex mysql-udf
MySQL Cannot Add Foreign Key Constraint

So I'm trying to add Foreign Key constraints to my database as a project requirement and it worked the first …

mysql sql foreign-keys
MySQL: Large VARCHAR vs. TEXT?

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (…

mysql text messages varchar
MySQL select 10 random rows from 600K rows fast

How can I best write a query that selects 10 rows randomly from a total of 600k?

mysql sql random
Delete all Duplicate Rows except for One in MySQL?

How would I delete all duplicate data from a MySQL Table? For example, with the following data: SELECT * FROM names; +…

mysql sql duplicates
How to do 3 table JOIN in UPDATE query?

I asked a question and got this reply which helped. UPDATE TABLE_A a JOIN TABLE_B b ON a.…

mysql join
Mysql error 1452 - Cannot add or update a child row: a foreign key constraint fails

I'm having a bit of a strange problem. I'm trying to add a foreign key to one table that references …

mysql foreign-keys mysql-error-1452
Export and Import all MySQL databases at one time

I want to keep a backup of all my MySQL databases. I have more than 100 MySQL databases. I want to …

mysql database-backups mysql-backup
Set NOW() as Default Value for datetime datatype?

I have two columns in table users namely registerDate and lastVisitDate which consist of datetime data type. I would like …

mysql sql datetime mysql-error-1067