How to duplicate a MySQL database on the same server

The mysql command line client will accept a stream of SQL statements from standard input. You can therefore pipe the output of mysqldump directly into mysql on the command line. Doing this as a cron job will regularly overwrite your test data with updated live data: mysql –user=username –password=passwd -e ‘DROP DATABASE test_db;’ mysql –user=username … Read more

How do you fix a bug you can’t replicate?

Language Different programming languages will have their own flavour of bugs. C Adding debug statements can make the problem impossible to duplicate because the debug statement itself shifts pointers far enough to avoid a SEGFAULT—also known as Heisenbugs. Pointer issues are arduous to track and replicate, but debuggers can help (such as GDB and DDD). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)