- Administration
- Startup on OS X: sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
- Shutdown: sudo mysqladmin shutdown
- Listing the content of the database in XML: mysqldump -X --user=orbeon --password=orbeon orbeon orbeon_form_data | less
- Connecting to the database from the command line as user orbeon: mysql --user=orbeon --password=orbeon orbeon
- DDL and testing
- Text column lengths (text, mediumtext, longtext)
- Employees test database
- Removed from the beginning of employees.sql the lines that create the employees database
- Import with mysql --user=orbeon --password=orbeon orbeon < employees.sql
- XML functions
- ExtractValue(xml, '/path/to/value')
- UpdateXML(xml, '/path/to/node', '<new-node/>')
- Replaces <node> by <new-node> (not the content of <node>)
- load_file('/path/to/file')
- Need to grant file permission
- mysql --user=root mysql
- grant file on *.* to 'orbeon'@'localhost';
- File needs to be in a place where MySQL can read
- sudo -u _mysql cat /tmp/BidForm.xml
- Issues
- "To deep XML"
- Bug
- Verified with 5.1.15
- On the bug thread, someone had this with 5.5.9
Tuesday, November 06, 2012
MySQL
Labels: mypedia