Default Date and Time
Hi All, I want to create a table that defaults to current_date and current_time. I have: CREATE TABLE `personalevent`( `pevent` mediumint(10) NOT NULL, `eventid` mediumint(10) NOT NULL, `userid` mediumint(10) NOT NULL, `username` varchar(10) NOT NULL, `password` varchar(10) NULL, `country` varchar(45) NULL, `zipcode` varchar(5) NULL, `city` varchar(35) NULL, `hstate` varchar(45) NULL, `exclusive` varchar(7) NULL, `eventtime` time NULL DEFAULT current_time(), `eventdate` date NULL DEFAULT current_date(), `eventdura` varchar(35) NULL, `daysevent` varchar(10) NULL, `crowd` varchar(25) NULL, `venue` varchar(50) NULL, `activitytype` varchar(45) NULL, `actdetails` varchar(255) NULL, `encodedby` varchar(100) NULL, `curmo` varchar(2) NULL, `pageweb` varchar(50) NULL, PRIMARY KEY (`pevent`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; But this throws a syntax error. I have tried Now() as well. What am I doing wrong? Best, -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Start MySQL with --intit-file?
Hi Guys, i am still lost here: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'XXX'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'XXX'; FLUSH PRIVILEGES; Here is the command that I am executing: [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=~/cloudsql.sql Stopping MySQL:[ OK ] Starting MySQL:[ OK ] [r...@server1 ~]# In cloudsql.sql I have: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'67.23.34.37' IDENTIFIED BY 'xxx'; FLUSH PRIVILEGES; commit; When I try to connect from my machine in my apartment I get: Unable to connect to host 67.23.34.37. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Host '173.8.172.53' is not allowed to connect to this MySQL server Can I start over some how or how do I fix? I have never had this much trouble, but I guess historically for me, I have not done a setup from scratch. -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Start MySQL with --intit-file?
OK, I have done this: [r...@server1 ~]# mysqld_safe A mysqld process already exists [r...@server1 ~]# /etc/init.d/mysqld stop Stopping MySQL:[ OK ] [r...@server1 ~]# mysqld_safe --init-file=~/cloudsql.sql Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 090429 20:12:30 mysqld ended [r...@server1 ~]# mysqld_safe stop Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 090429 20:12:54 mysqld ended [r...@server1 ~]# /etc/init.d/mysqld start Starting MySQL:[ OK ] [r...@server1 ~]# I tried to connect and still same error message of: Unable to connect to host 67.23.34.37. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Host '173.8.172.53' is not allowed to connect to this MySQL server I must be a dunce, I know you guys know what you are talking about! -Jason On Apr 29, 2009, at 12:28 PM, mark konetchy wrote: i dont think that the init.d script will accept the argument. you need to run /usr/bin/mysqld_safe --init-file=clouds.sql (or whatever the path to mysqld_safe is) 2009/4/29 Jason Todd Slack-Moehrle mailingli...@mailnewsrss.com Hi Guys, i am still lost here: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'XXX'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'XXX'; FLUSH PRIVILEGES; Here is the command that I am executing: [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=~/ cloudsql.sql Stopping MySQL:[ OK ] Starting MySQL:[ OK ] [r...@server1 ~]# In cloudsql.sql I have: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'67.23.34.37' IDENTIFIED BY 'xxx'; FLUSH PRIVILEGES; commit; When I try to connect from my machine in my apartment I get: Unable to connect to host 67.23.34.37. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Host '173.8.172.53' is not allowed to connect to this MySQL server Can I start over some how or how do I fix? I have never had this much trouble, but I guess historically for me, I have not done a setup from scratch. -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Start MySQL with --intit-file?
Hi Mark, I am all set now, The log said it could not find the sql file, so I put it in /tmp and hard coded the path to /tmp/cloudsql.sql and it works now! Weird because I had used ~/cloudsql.sql and /root/cloudsql.sql as paths too Thank you so much for your help! John and Andy too! -Jason On Apr 29, 2009, at 1:20 PM, mark konetchy wrote: Jason, It looks like mysql is erroring out when you try to start it from the command line. What does the error log say? 2009/4/29 Jason Todd Slack-Moehrle mailingli...@mailnewsrss.com OK, I have done this: [r...@server1 ~]# mysqld_safe A mysqld process already exists [r...@server1 ~]# /etc/init.d/mysqld stop Stopping MySQL:[ OK ] [r...@server1 ~]# mysqld_safe --init-file=~/cloudsql.sql Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 090429 20:12:30 mysqld ended [r...@server1 ~]# mysqld_safe stop Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 090429 20:12:54 mysqld ended [r...@server1 ~]# /etc/init.d/mysqld start Starting MySQL:[ OK ] [r...@server1 ~]# I tried to connect and still same error message of: Unable to connect to host 67.23.34.37. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Host '173.8.172.53' is not allowed to connect to this MySQL server I must be a dunce, I know you guys know what you are talking about! -Jason On Apr 29, 2009, at 12:28 PM, mark konetchy wrote: i dont think that the init.d script will accept the argument. you need to run /usr/bin/mysqld_safe --init-file=clouds.sql (or whatever the path to mysqld_safe is) 2009/4/29 Jason Todd Slack-Moehrle mailingli...@mailnewsrss.com Hi Guys, i am still lost here: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'XXX'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'XXX'; FLUSH PRIVILEGES; Here is the command that I am executing: [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=~/ cloudsql.sql Stopping MySQL:[ OK ] Starting MySQL:[ OK ] [r...@server1 ~]# In cloudsql.sql I have: GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'xxx'; GRANT ALL ON mysql.* TO 'root'@'67.23.34.37' IDENTIFIED BY 'xxx'; FLUSH PRIVILEGES; commit; When I try to connect from my machine in my apartment I get: Unable to connect to host 67.23.34.37. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Host '173.8.172.53' is not allowed to connect to this MySQL server Can I start over some how or how do I fix? I have never had this much trouble, but I guess historically for me, I have not done a setup from scratch. -Jason
Start MySQL with --intit-file?
I am trying to start MySQL with --init-file but i get that it is an invalid option. the 'man' page and --help dont help me decide what is. Here is what I am doing: r...@server1 ~]# mysql start --init-file = cloudsql.txt mysql: unknown option '--init-file' Thoughts? -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Start MySQL with --intit-file?
Hi, I am trying: [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=cloudsql.sql Stopping MySQL:[ OK ] Starting MySQL:[ OK ] the cloudsql.sql file contains: UPDATE mysql.user SET Password=PASSWORD('xxx') WHERE User='root'; FLUSH PRIVILEGES; GRANT ALL ON mysql.* TO 'root'@'localhost'; FLUSH PRIVILEGES; GRANT ALL ON mysql.* TO 'root'@'173.8.172.53'; commit; But I still get that I cannot connect from 173.8.172.53 I still dont see what I am doing wrong... -Jason On Apr 28, 2009, at 5:34 PM, mark konetchy wrote: hey jason, you need to restart the *server* with the init-file option, have a look at: http://dev.mysql.com/doc/refman/5.0/en/server-options.html 2009/4/28 Jason Todd Slack-Moehrle mailingli...@mailnewsrss.com I am trying to start MySQL with --init-file but i get that it is an invalid option. the 'man' page and --help dont help me decide what is. Here is what I am doing: r...@server1 ~]# mysql start --init-file = cloudsql.txt mysql: unknown option '--init-file' Thoughts? -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=markkonet...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Resetting MySQL Root Password
Hi All, CentOS 5.3 I installed MySQL Server via yum and started it. I tried entering: mysqladmin -u root password yourrootsqlpassword mysqladmin -h server1.example.com -u root password yourrootsqlpassword But I get: r...@server1 ~]# /usr/bin/mysqladmin -u root -h localhost password mypassword /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' How can I reset this and allow Root access, otherwise nobody has access! Thanks, -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
On OS X
Hi All, On OS X, I have some Obj-C that creates NSTasks to execute some sql statements. What do I deploy on the client to make this work for them? I want to make it park of my package installer, but I dont know what pieces. Thoughts? -Jason -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Comma's in data?
Hi All, I have a client that wants to insert data into a VarChar field that contains commas. These are property addresses. Example: 2966 Moorpark Ave, San Jose, CA, 95128 1 Infinite Loop, Cupertino, CA, 95 How can I allow this? Thanks! -Jason
bug in 4.1.1 (current)
-- mysql select * from msg where Author=6213 and (Saved='s' or Saved='n') order by ID; Empty set (0.00 sec) --- mysql select COUNT(*) from msg where Author=6213 and (Saved='s' or Saved='n') order by ID; +--+ | COUNT(*) | +--+ | 191 | +--+ 1 row in set (0.01 sec) mysql select ID from msg where Author=6213 order by ID; .. | 18540 | +---+ 220 rows in set (0.01 sec) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]