mysql web host
Hi, I know this may not strictly be within the remit of this mailing list but. I am having problems with my web host, I need to use Innodb tables, however my web host will not allow these table types (because of the obvious extra overhead), can anybody out there recommend/currently use a webhost who allow the Innodb table type? Many thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
timestamps and timezones
I see that LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW() when I use now() I get the database time but I have a webhost based in US (Pacific Time), however most database events will be generated from BST and this is the time zone I want to use to populate audit trail tables etc. I could programmatically compensate the US time zone by adding the hours to make up the BSTis there any neater way of doing this, as this solution would involve some hard coding. Kind regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
store file in MySQL database
Hi, I want to store a .txt file in a table in a MySQL database, typically what is the best type of data type/ column to use for this. The .txt will not exceed 100K. Thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
triggers
Hi Are there any plans to have triggers introduced into MySQL? Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
opinion please
I am going to have a web hosted MySQL database. It will hopefully have 100+ users. I was thinking of having one database to store all records for all users. I would store a user_id against records where appropriate to relate them to a particular user. The database will have a contacts table, users table, session_data table the contacts table will contain a field user_id to identify which contact is associated with which user. This will lead to a very large contacts table (million records???) Alternatively I could create a database for each user database_user1, database_user2 etc, each one of these databases could be then referenced dynamically in my application code, depending on the user logged in. Each one would have its own contacts table, specifically for that user. Which is the better way to go, in the opinion of any gurus out there..one very large database or multiple instances of user particular databases. Any guidance would be greatly appreciated. Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
alter table query
I have a table that has a column : session_id INTEGER UNSIGNED NOT NULL, I now want to store a hexadecimal value in this column instead. the column already contains values for some records.can I alter the data type of this column (make it a varchar) without loosing the data already stored? or must I drop the column and then add it using the new data type. I would loose my data by dropping the column. (I can extract the data and repopulate the table (with the new data type field) if necessary but would like to avoid this) any ideas? Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
where clause query
does MySQL have an equilivent for the WHERE Unique_id IN ('1',' 2', '3') as used in oracle. select * from tableX where tableX_id IN ('1', '2', '3') i.e. if I have a comma delimited list of values for a certain field on a table...I can search for all records that have the values in my comma delimited list.using the one where clause? Thanks for your patience...I could not find this in the documentation. Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: question on autoincrement
similar-ish to setting your sequence in oracle try this: The create table statement below will start the auto increment at 1 CREATE TABLE TableX ( X_primary_key INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, X_col1 VARCHAR(20) NOT NULL, X_col2 VARCHAR(40) NOT NULL, X_col3 VARCHAR(10) NOT NULL, PRIMARY KEY(X_primary_key) ) AUTO_INCREMENT = 1; also see: ALTER TABLE tbl_name AUTO_INCREMENT = 100 will start your records at 100 ALTER TABLE tbl_name AUTO_INCREMENT = 1000 will start your records at 100 I haven't actually used the last bit of code, it is courtsey of : http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html this should sort you out.. Regards Joe -Original Message- From: Amit Wadhwa [mailto:[EMAIL PROTECTED] Sent: 01 April 2004 23:33 To: [EMAIL PROTECTED] Subject: question on autoincrement Hi All, I was wondering if there was a way in mySQL wherein I tell the autoincrement spec where to start from? Eg. Autoincrement startfrom 1 And the values go in as: 10001..10002 and so on,.. instead of 1..2..3.. ..like sequencing in oracle Any help is appreciated, Thanks Amit Wadhwa Data Analyst -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ibdata1 size
HI, the ibdata1file in mysql\data has reached a size of 10Mb in just over a week, the database I have set up is quite limited, only 7 tables with no more than 12 records in any one table (only evaluating database models on MySQL at the moment). I have done 4 MySQL dumps and some inserts / updates etc but all low volume. Is there some setting I need to have to keep the size of this file down, or is there a maintenance task to clear it out? What is the significance of this file? Any pointers would be greatly appreciated, as my database will be vastly increased in size and disk space may become an issue. Many thanks for your patience Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqldump command error
I have read the documentation on the MySQLDump, but have been unable to launch a mysql dump. Is the dump performed while logged on to the database that you want to dump, or do you log onto the machine where the database is and specify which database you want to dump?. I have looked at and applied some of the sample mysqldump commands given in the documentation, but all have resulted in syntax errors. See below Any advice or pointers would be greatly appreciated. many thanks for your patience Joe nuatech_1 is the name of my database nuatech is my password set up for the root user I want to dump it to a file called dump1.txt My database is set up on localhost Opted to use the database upon which I want to perform mysqldump: mysql use nuatech_1 Database changed Tried a mysqldump: mysql mysqldump -u root -p nuatech nuatech_1 dump1.txt; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'mysqldump -u root -p nuatech nuatech_1 dump.txt' at line 1 Tried again removing spaces before parameters mysql mysqldump -uroot -pnuatech nuatech_1 dump1.txt; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'mysqldump -u root -pnuatech nuatech_1 dump1.txt' at line 1 logged out of mysql: mysql quit Bye Logged back in ( not to a particular database) C:\mysql\binmysql -u root -p mysql Enter password: *** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.18-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. Tried the mysqldump again: mysql mysqldump -uroot -pnuatech nuatech_1 dump1.txt; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'mysqldump -u root -pnuatech nuatech_1 dump1.txt' at line 1 Tried again with spaces before the parameters: mysql mysqldump -u root -p nuatech nuatech_1 dump1.txt; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'mysqldump -u root -p nuatech nuatech_1 dump1.txt' at line 1 mysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
elegant backup
I did a back up of a database (datbase_1),generated the dump file from database_1 I then created a new database database_2 and imported the dump file from database_1 into database_2 I then copied all the data files (located at mysql\data\database_2) from database_2 to database_1 Restarted database_1 and it worked ok with the original back up of database_1. While this all worked fine.is there a more elegant way of backing up and then restoring a database? many thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
database dump query
Hi, anyone know what happens if, while I am doing a database dump, someone logs into the database and updates records, what records are trapped in the dump, or can the dump proceed under this circumstance...in other words must I knock all users off the database before the dump is done? Many thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
operators in mysql
Hi, can operators be used in MySQL e.g. a table Table X with column A, column B column C All three are floats can I use select (A-B) from X where condition or will I have to so the A-B calculation in my application code instead? Also can I use select C from X where condition Then update X set C = (return values got from above + New Increment) where condition Any help would be greatly appreciated many thanks Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
composite Keys
Hi, does MySQL support composite keys? I have a table 'Group_Map' This has 3 fields contact_id (primary key in another table) group_id (candidate key in another table) user_id (primary key in another table) is it possible / advisable to create and maintain a composite key for this table? Kind Regards Joe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]