MySQL Query Browser is an excellent (and FREE) GUI tool for managing your MySQL databases. In order to create a new database, follow the steps below. 1. Open MySQL Query Browser. You will be presented with the login screen. Fill in the appropriate information and click OK. 2. You may be presented with the following dialog box about the default schema (i.e. database). … [Read more...] about Create a New Database in MySQL Query Browser
Programming
mySql error 1005 (errno: 150)
mySql error 1005 (errno: 150) solution This mysql error occurs when creating a table with the InnoDB engine and is basically telling you that there is a "foreign key problem" with your schema. The thing to check to fix this error is to make sure that your foreign key fields are of the same datatype as their source fields. As an example, assume the main table is "people", … [Read more...] about mySql error 1005 (errno: 150)
PHP/MySQL: How to Store Queries in a Separate Include File
When implementing a php/mysql database (or any database for that matter), it's sometimes easy to have all of the queries located in one place, as opposed to having them hard-coded into the pages. If the queries are hard-coded in, and the queries are reused on multiple pages (which they often are), it can be a cumbersome task to update all of the queries. Having hard-coded … [Read more...] about PHP/MySQL: How to Store Queries in a Separate Include File
Regular Expression for Single Letter – PHP
I was working on a project where I needed to validate a querystring for a single letter -- uppercase or lowercase. Since there is no php equivalent to the is_numeric() function, (e.g. a hypothetical is_alpha() function) I decided to use regular expressions to get the task done. I could have used ctype_alpha(), but that function wouldn't account for the fact that I needed to … [Read more...] about Regular Expression for Single Letter – PHP
MySQL: How to Change the Database Name
Once you've created a MySQL database and named it you cannot rename the database using standard SQL commands such as ALTER in the same manner as you would rename a table. The way to rename a database is as simple as creating a new, empty database, and then recreating the old database in this new database. Here are the detailed steps: 1. Run a mysqldump on the existing … [Read more...] about MySQL: How to Change the Database Name