» MySQL Cheat Sheet » Blog Archive Alice Hill’s Real Tech News - Independent Tech Extended Regular Expression Matching: mysql> SELECT * FROM table WHERE rec RLIKE “^b$”; (. for char, […] for char class, * for 0 or more instances ^ for beginning, {n} for repeat n times, and $ for end) (RLIKE or REGEXP) To force case-sensitivity, use “REGEXP BINARY” Selecting from multiple tables: (Example) mysql> SELECT pet.name, comment FROM pet, event WHERE pet.name = event.name; Auto-incrementing rows: mysql> CREATE TABLE table (number INT NOT NULL AUTO_INCREMENT, name CHAR(10) NOT NULL); mysql> INSERT INTO table (name) VALUES (”tom”),(”dick”),(”harry”); Batch mode (feeding in a script): # mysql -u user -p < batch_file (Use -t for nice table layout and -vvv for command echoing.) Alternatively: mysql> source batch_file; in Public bookmarkswith mysqltipsntricks
Handy Cheat-Sheet of MySQL Commands From your login shell... # Creating a Database # mysqladmin create [databasename] Example: # mysqladmin create mydatabase [Enter] # Dropping (Removing) a Database # mysqladmin drop [databasename] Example: # mysqladmin drop mydatabase [Enter] # Populating an Existing Database from a *.sql File # mysql [databasename] < [databasedumpfile.sql] Example: # mysql mydatabase < mydatabase.sql [Enter] # Dumping Database Structure and Data to a *.sql file mysqldump --opt [database] > [databasefilename.sql] Example: mysqldump --opt techmanual > techmanual.sql; From within the MySQL interface... # Starting MySQL from the Command Line # mysql Example: mysql [Enter] You will be welcomed with the following message: Welcome to the MySQL monitor. Commands end in Public bookmarkswith mysqltipsntricks
Hockinson.com: Cheat Sheet for MySQL 4.x Schema Portions of the following are quoted from the MySQL web site. Observations and opinions expressed below may be useful to MySQL newbies (use this information at your own risk). Use the underscore character in your column names, e.g. first_name. Subsequently in your PHP scripts the underscore can be easily replaced with a space. Use only lower case letters to ensure portability to other system configurations. Avoid using hyphens in the names of databases, tables, and columns. Situations can arise where the schema is not portable to another system configuration if upper case letters and/or hyphens are used. Hyphens appearing in a double-quoted line of PHP code may be interpreted as a minus sign (crashing the script). Usage of SET and ENUM fields is tricky when MySQL Schema Cheat Sheet for PHP cheatcheatsheetdatabaseexamplelearningmysqlphpschemasheettutorial in Public bookmarkswith mysqltipsntricks
manalang.com » Archives # !mobiledesktop # %s # 2005 # adobe # advice # aggregator # airplane # ajax # algorithms # amazon # amusing # apache # api # apollo # apple # architecture # art # atom # auto # b&w # baby # background # backup # bandwidth # battery # beer # bestof # blogging # blogs # bone # bookmarking # bookmarklet # bookmarklets # bookmarks # books # bpel # browser # bugtracking # business # business2.0 # cabletv # caching # camera # cancer # capture # career # cell # charting # chat # cheatsheet # cherrypy # christmas # cisco # cms # code # color # comet # comic # comparison # complementary # compression # computers # computerscience # computing # conference # congress # cooking # coupon # coupons # cpu # cryonics # css # database # deals # del.icio.us # delicious # de in Public bookmarkswith ajaxfirefoxgreasemonkeyjavajavascritptmysqlsqltipsntrickstutorialweb2.0
MySQL Cheat Sheets - ILoveJackDaniels.com The MySQL cheat sheet is designed to act as a reminder and reference sheet, listing useful information about MySQL. It includes a list of the available functions in MySQL, as well as data types. It also includes a list of MySQL functions available in PHP, and a list of useful sample queries to select data from a database. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size MySQL cheat sheet: * PNG, 106KB * PDF, 435KB Functions in MySQL in Public bookmarkswith mysqltipsntricks
MySQL Reference (Cheat) Sheet I’ve been putting together a quick reference guide to MySQL for some upcoming projects and thought that it was handy enough others might find it useful. When I went looking for some good references I was surprised to only find a handful of options and none of them alone had all the information I wanted at my fingertips. So, I figured, it would be worth it to spend the time to create my very own super-uber-ultimate MySQL reference. And now, I’m giving it to you… my lucky readers! I’ve been putting together a quick reference guide to MySQL for some upcoming projects and thought that it was handy enough others might find it useful. When I went looking for some good references I was surprised to only find a handful of options and none of them alone had all the information I wanted at my fingertips. So, I figured, it would be worth it to spend the time to cr in Public bookmarkswith mysqltipsntricksby 2 users
MySQL Reference (Cheat) Sheet I’ve been putting together a quick reference guide to MySQL for some upcoming projects and thought that it was handy enough others might find it useful. When I went looking for some good references I was surprised to only find a handful of options and none of them alone had all the information I wanted at my fingertips. So, I figured, it would be worth it to spend the time to create my very own super-uber-ultimate MySQL reference. And now, I’m giving it to you… my lucky readers! I’ve been putting together a quick reference guide to MySQL for some upcoming projects and thought that it was handy enough others might find it useful. When I went looking for some good references I was surprised to only find a handful of options and none of them alone had all the information I wanted at my fingertips. So, I figured, it would be worth it to spend the time to cr in Public bookmarkswith mysqltipsntricksby 2 users
ONJava.com: Database Connection Pooling with Tomcat Software object pooling is not a new concept. There are many scenarios where some type of object pooling technique is employed to improve application performance, concurrency, and scalability. After all, having your database code create a new Connection object on every client request is an expensive process. Moreover, with today's demanding applications, creating new connections for data access from scratch, maintaining them, and tearing down the open connection can lead to massive load on the server. Connection pooling eliminates JDBC overhead. Further, object pooling also helps to reduce the garbage collection load. In this article, we'll look at an elegant way of creating a pool of open database-connection objects in Tomcat, so that they are handy whenev Rather than repeatedly create and destroy database connections, experienced enterprise developers employ a pool of reusable connections. Kunal Jaggi shows how to implement this in Tomcat. 2.0connectionconnectionsdatabasedbcpjdbcjmeterjndimeasurementmediaoreillyperformanceplanpoolingtest in Public bookmarkswith javamysqltipsntrickstomcat
This is a brief tutorial for using MySQL server To Run MySQL Server =================== 1- Go to /usr/bin/ 2- ./mysql_install_db 3- ./safe_mysqld --user=root & Testing that the Server is running ================================== 1- ./mysqladmin version 2- ./mysqladmin variables Shutting down the server ======================== 1- ./mysqladmin -u root shutdown Show DataBases =============== 1- ./mysqlshow 2- ./mysqlshow <database-name> Executing commands ================== 1- mysql -e "SELECT * FROM table" <database-name> Connect to MySQL ================ 1- mysql -h <host> -u <user> -p <Database-Name> Show DataBases ---------------- 1- mysql> SHOW DATABASES; Using Certian Database ---------------------- 1- my in Public bookmarkswith mysqltipsntrickstutorial