Re: How do you think about PostgreSQL and mysql?
My choice was based on the fact that web requires a high number of reads and normally far fewer writes. The speed of MySQL in read is very fast compared to PostgreSQL. Where it comes to accounting, high transactions and such applications I will continue to use PostgreSQL till MySQLv5 becommes stable where I will switch over fully to MySQL Rob stone.wang wrote: How do you think about PostgreSQL and mysql? want to know which is good? How to choose database for the web? -- Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do you think about PostgreSQL and mysql?
Hi Stone, if you ask me which is bettet your car or mine, i'll answer mine. Your question can't be answered here because it's not technical but political. Better close this thread. Mathias Selon stone.wang [EMAIL PROTECTED]: How do you think about PostgreSQL and mysql? want to know which is good? How to choose database for the web? Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: problem with mysqldump when there is a merge table
Hi, Have you tried '\\' ? Mathias Selon nyem [EMAIL PROTECTED]: Hello, I have a database (on Win2k) with merge table. Mysqldump output includes some path information on the merged tables such as DATA DIRECTORY and INDEX DIRECTORY DROP TABLE IF EXISTS `rptpricing1996`; CREATE TABLE `rptpricing1996` ( `PricingId` int(11) NOT NULL default '0', `commodity` char(22) NOT NULL default '', `variables` char(7) NOT NULL default '', `PricingDt` date NOT NULL default '-00-00', `PricingHighPrice` decimal(12,2) default NULL, `PricingLowPrice` decimal(12,2) default NULL, `PricingAvgPrice` decimal(12,2) default NULL, PRIMARY KEY (`PricingId`), KEY `commodityDate` (`commodity`,`PricingDt`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='C:\SDVI\DB\mysql\data\dbsdvi\' INDEX DIRECTORY='C:\SDVI\DB\mysql\data\dbsdvi\'; When trying to load the database back (mysql dbsdvi dbsdvi.dump) the path information produces errors as mysql treats the \ character as an escaped character. Removing the path information eliminates the error, but how do I tell mysqldump not to output the path information? regards, nyem -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: why donn't work mysql_real_connect
Hi, I don't use C APPI, but found this in docs for you : *** connect sample : MYSQL mysql; mysql_init(mysql); mysql_options(mysql,MYSQL_READ_DEFAULT_GROUP,your_prog_name); if (!mysql_real_connect(mysql,host,user,passwd,database,0,NULL,0)) { fprintf(stderr, Failed to connect to database: Error: %s\n, mysql_error(mysql)); } They give port, unix_socket, client_flag the values 0,NULL,0. Try this. All the rest is at http://dev.mysql.com/doc/mysql/en/mysql-real-connect.html and http://dev.mysql.com/doc/mysql/en/c-api-functions.html Mathias Selon mm [EMAIL PROTECTED]: Dear friends, This is my first cpp module working with mySQL. It looks like the error is located in MYSQL *m=mysql_real_connect(myDB, host, user, passwd, ... There is a way to find out step by step which parameters is wrong? I am working with Fedora core 3 and MySQL 3.23.58 Thanks, MT ++ CPP module +++ #include /usr/include/mysql/mysql.h int modulMySQL() { printf(modulMySQL 01\n); fflush(stdout); // MYSQL *mysql_init(MYSQL *mysql) // === MYSQL *myDB; MYSQL *mysql_init(myDB); printf(modulMySQL 02\n); fflush(stdout); // MYSQL *mysql_real_connect(MYSQL *mysql, const char *host, const char // *user, const char *passwd, const char *db, unsigned int port, // const char *unix_socket, unsigned long client_flag) // char *host=NULL, user[]=myname, passwd[]=mypass; char db[]=ro; unsigned int port=3306; const char *unix_socket=NULL; unsigned long client_flag=0; MYSQL *m=mysql_real_connect(myDB, host, user, passwd, db, port, unix_socket, client_flag); printf(modulMySQL 03\n); fflush(stdout); // int mysql_ping(MYSQL *mysql) // === int p=mysql_ping(myDB); printf(Return Values - Zero if the server is alive.p=[%i]\n, p); } + Compilation Execution +++ CFG=/usr/lib/mysql/mysql_config sh -c gcc -o myC `$CFG --cflags` -lstdc++ 01.cpp `$CFG --libs` ./myC 01_out.txt ++ 01_out.txt ++ modulMySQL 01 modulMySQL 02 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup and Maintenance Strategies
Selon James Tu [EMAIL PROTECTED]: What have people done in the past regarding backup strategies? Is it adequate enough to rely on filesystem backups for mysql? Basically such that we can restore MySQL to the last filesystem backup. Is there a reason not to do this? I don't have any mission critical data and data that is lost since the last backup is acceptable. -James Hi, Filesystem backup for Mysql is similar to the one for all other RDBMS. You can't do it online, otherwise your database will not be coherent. the checkpoint times must be the same for all the datafiles. SO YOU CAN DO IT OFFLINE. you can also do a filesystem backup ONLINE if the RDBMs can put thetablespace sin Backup status. This is not done in pre-4 release of mysql. That's why replication master-slave is a backup solution. You can see innobackup which can do online backup since it can manage transactions during backup operation. If your data are not crtical (as you say), the database availability is not also. You can stop it and take an offline filesystem backup. Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do you think about PostgreSQL and mysql?
Does any one know how PostgreSQL compares to MySQL regarding stability and maintenance? I have been using MySQL for about two years, and it has proved to be very stable and requires almost zero maintenance. FB Hi Stony, I didn't use PostgreSQL before, so couldn't comment. For MySQL, you have to beware of the following: - Store procedure, views, triggers is supported only in version 5, which is still in development phase. - clustering / failover feature is only out for about 9 months, so the stability in this area is yet to be proved. Other than that, it is easy to use and supported by many different programming language including C/C++, Java, python, .NET and etc. We are using MySQL in our server side product. So far, no single problem is found. -- Ka Chun How do you think about PostgreSQL and mysql? want to know which is good? How to choose database for the web? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: could a Trigger execute a outside command?
Isn't this what a User Defined Function would be used for? Your trigger would call the UDF which would do a system(). Or is this not possible under Mac OS? -Lee Gleb Paharenko [EMAIL PROTECTED] I don't know any SQL statements which could launch extern commands, at least in MySQL. So in triggers it is impossible as well. Ted Zeng [EMAIL PROTECTED] wrote: Hi, I am using MySql on Mac OS X. I am wondering if I could execute a command (shell, perl) by a Trigger. I read the manual and it seems this is impossible. ted -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: why donn't work mysql_real_connect
Hi, I did it so I thank you again. Belove is my code that did it, I hope, what I expect. I notice the version of documentation not the same as my copy on my hard drive. Thanks again, mt #include /usr/include/mysql/mysql.h int modulMySQL() { MYSQL mysql; printf(01\n); fflush(stdout); mysql_init(mysql); printf(02 \n); fflush(stdout); if (!mysql_real_connect(mysql, NULL,user,pass,ro,0,NULL,0)) { fprintf(stderr, Failed to connect to database: Error: %s\n, mysql_error(mysql)); } printf(OK\n); fflush(stdout); } Mathias wrote: Hi, I don't use C APPI, but found this in docs for you : *** connect sample : MYSQL mysql; mysql_init(mysql); mysql_options(mysql,MYSQL_READ_DEFAULT_GROUP,your_prog_name); if (!mysql_real_connect(mysql,host,user,passwd,database,0,NULL,0)) { fprintf(stderr, Failed to connect to database: Error: %s\n, mysql_error(mysql)); } They give port, unix_socket, client_flag the values 0,NULL,0. Try this. All the rest is at http://dev.mysql.com/doc/mysql/en/mysql-real-connect.html and http://dev.mysql.com/doc/mysql/en/c-api-functions.html Mathias Selon mm [EMAIL PROTECTED]: Dear friends, This is my first cpp module working with mySQL. It looks like the error is located in MYSQL *m=mysql_real_connect(myDB, host, user, passwd, ... There is a way to find out step by step which parameters is wrong? I am working with Fedora core 3 and MySQL 3.23.58 Thanks, MT ++ CPP module +++ #include /usr/include/mysql/mysql.h int modulMySQL() { printf(modulMySQL 01\n); fflush(stdout); // MYSQL *mysql_init(MYSQL *mysql) // === MYSQL *myDB; MYSQL *mysql_init(myDB); printf(modulMySQL 02\n); fflush(stdout); // MYSQL *mysql_real_connect(MYSQL *mysql, const char *host, const char // *user, const char *passwd, const char *db, unsigned int port, // const char *unix_socket, unsigned long client_flag) // char *host=NULL, user[]=myname, passwd[]=mypass; char db[]=ro; unsigned int port=3306; const char *unix_socket=NULL; unsigned long client_flag=0; MYSQL *m=mysql_real_connect(myDB, host, user, passwd, db, port, unix_socket, client_flag); printf(modulMySQL 03\n); fflush(stdout); // int mysql_ping(MYSQL *mysql) // === int p=mysql_ping(myDB); printf(Return Values - Zero if the server is alive.p=[%i]\n, p); } + Compilation Execution +++ CFG=/usr/lib/mysql/mysql_config sh -c gcc -o myC `$CFG --cflags` -lstdc++ 01.cpp `$CFG --libs` ./myC 01_out.txt ++ 01_out.txt ++ modulMySQL 01 modulMySQL 02 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: could a Trigger execute a outside command?
Hello. Yes, you're right. I've forgotten about them, sorry. [EMAIL PROTECTED] wrote: Isn't this what a User Defined Function would be used for? Your trigger would call the UDF which would do a system(). Or is this not possible under Mac OS? -Lee Gleb Paharenko [EMAIL PROTECTED] I don't know any SQL statements which could launch extern commands, at least in MySQL. So in triggers it is impossible as well. Ted Zeng [EMAIL PROTECTED] wrote: Hi, I am using MySql on Mac OS X. I am wondering if I could execute a command (shell, perl) by a Trigger. I read the manual and it seems this is impossible. ted -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
CHECK constraint
Dear List, My system is RedHat EL3 and MySQL 5.0.7-beta. I wanted to implement a check constraint (below), but after some testing and googling, it seems I can't do this with MySQL. I've read suggestions that check(s) should be done using triggers. Is a trigger a preferred method of achieving the following: CREATE TABLE tblJob ( JobId SMALLINT UNSIGNED NOT NULL, CustomerIdSMALLINT UNSIGNED NOT NULL, JobType VARCHAR(20) NOT NULL DEFAULT 'DesignInstall', Description VARCHAR(100) NOT NULL, QuotationDate DATE NOT NULL, OrderDate DATE, CHECK (JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly')), PRIMARY KEY (JobId, CustomerId) ) TYPE=InnoDB; Regards, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup and Maintenance Strategies
I don't know how big your tables are, and if you can withstand any downtime. Because we're using MyISAM tables, we use mysqlhotcopy, which locks the database as it copies the tables to another location. Once that's been done you can rely on your filesystem backup to keep copies of the data files but know that they'll be a point-in-time snapshot. We also use mysqldump, which works for all table types and can do the job if your tables aren't too large. Again, if you dump your tables to another folder/disk, the fs backup is a good way to keep copies of that data. Mike On Jun 25, 2005, at 1:32 AM, James Tu wrote: What have people done in the past regarding backup strategies? Is it adequate enough to rely on filesystem backups for mysql? Basically such that we can restore MySQL to the last filesystem backup. Is there a reason not to do this? I don't have any mission critical data and data that is lost since the last backup is acceptable. -James Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CHECK constraint
A trigger is a good place to check the value, and change it, bit I don't believe you can actually generate a MySQL error within the trigger that will prevent the data from being inserted. Currently (unless there's been an update to triggers that's not yet in the docs), you can only change the value before it gets inserted. If you are looking to enforce the values going into your JobType column, you might be better off creating a JobType table, with a foreign key restraint between the tblJob.JobType and JobType.Name, and make sure that the only entries in the JobType.Name column are those you want to appear in the tblJob.JobType column. On Jun 25, 2005, at 10:28 AM, Chris Andrew wrote: Dear List, My system is RedHat EL3 and MySQL 5.0.7-beta. I wanted to implement a check constraint (below), but after some testing and googling, it seems I can't do this with MySQL. I've read suggestions that check(s) should be done using triggers. Is a trigger a preferred method of achieving the following: CREATE TABLE tblJob ( JobId SMALLINT UNSIGNED NOT NULL, CustomerIdSMALLINT UNSIGNED NOT NULL, JobType VARCHAR(20) NOT NULL DEFAULT 'DesignInstall', Description VARCHAR(100) NOT NULL, QuotationDate DATE NOT NULL, OrderDate DATE, CHECK (JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly')), PRIMARY KEY (JobId, CustomerId) ) TYPE=InnoDB; Regards, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: CHECK constraint
Another approach would be to use a view with a CHECK OPTION. This will allow the view to behave exactly like a check constraint: CREATE VIEW tblJob_view AS SELECT JobId, CustomerId, JobType, Description, QuotationDate, OrderDate FROM tblJob WHERE JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly') WITH CHECK OPTION This will force or constraint the view to only accept inserts where the criteria specified in the WHERE clause matches. -- Partha Dutta, Senior Consultant MySQL Inc, NY, USA, www.mysql.com Are you MySQL certified? www.mysql.com/certification -Original Message- From: Michael Kruckenberg [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 10:57 AM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: CHECK constraint A trigger is a good place to check the value, and change it, bit I don't believe you can actually generate a MySQL error within the trigger that will prevent the data from being inserted. Currently (unless there's been an update to triggers that's not yet in the docs), you can only change the value before it gets inserted. If you are looking to enforce the values going into your JobType column, you might be better off creating a JobType table, with a foreign key restraint between the tblJob.JobType and JobType.Name, and make sure that the only entries in the JobType.Name column are those you want to appear in the tblJob.JobType column. On Jun 25, 2005, at 10:28 AM, Chris Andrew wrote: Dear List, My system is RedHat EL3 and MySQL 5.0.7-beta. I wanted to implement a check constraint (below), but after some testing and googling, it seems I can't do this with MySQL. I've read suggestions that check(s) should be done using triggers. Is a trigger a preferred method of achieving the following: CREATE TABLE tblJob ( JobId SMALLINT UNSIGNED NOT NULL, CustomerIdSMALLINT UNSIGNED NOT NULL, JobType VARCHAR(20) NOT NULL DEFAULT 'DesignInstall', Description VARCHAR(100) NOT NULL, QuotationDate DATE NOT NULL, OrderDate DATE, CHECK (JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly')), PRIMARY KEY (JobId, CustomerId) ) TYPE=InnoDB; Regards, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
starting mysql 4.1.12 on Ubuntu Linux
I'm starting to play with linux. Till now I have over my shoulders three days experience with it :-) I have been able to install and successfully run mysql 4.1.12 but something it's happening I cannot understand (no surprise) With my sql stopped I go to console as root and write: cd /etc/init.d mysql start and get this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld/mysqld.sock' (2) but with cd /var/lib/mysql /etc/init.d/mysql start server gets up and ready. PS: I have just find that: cd /etc/init.d /etc/init.d/mysql start works fine too!!! I would like to learn what's the difference between mysql start and /etc/init.d/mysql start if I'm sitting on /etc/init.d I think this error is preventing mysql from automatically starting on start up. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CHECK constraint
But if you follow Partha's approach, you will need to make sure that the only inserts to the table occur via the view. Nothing in the definition of the view itself prevents a user with the necessary authority from inserting directly into the table. You'll need to ensure that your GRANTs don't permit any person or program to insert data directly via the table. Rhino - Original Message - From: Partha Dutta [EMAIL PROTECTED] To: 'Michael Kruckenberg' [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Saturday, June 25, 2005 11:11 AM Subject: RE: CHECK constraint Another approach would be to use a view with a CHECK OPTION. This will allow the view to behave exactly like a check constraint: CREATE VIEW tblJob_view AS SELECT JobId, CustomerId, JobType, Description, QuotationDate, OrderDate FROM tblJob WHERE JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly') WITH CHECK OPTION This will force or constraint the view to only accept inserts where the criteria specified in the WHERE clause matches. -- Partha Dutta, Senior Consultant MySQL Inc, NY, USA, www.mysql.com Are you MySQL certified? www.mysql.com/certification -Original Message- From: Michael Kruckenberg [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 10:57 AM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: CHECK constraint A trigger is a good place to check the value, and change it, bit I don't believe you can actually generate a MySQL error within the trigger that will prevent the data from being inserted. Currently (unless there's been an update to triggers that's not yet in the docs), you can only change the value before it gets inserted. If you are looking to enforce the values going into your JobType column, you might be better off creating a JobType table, with a foreign key restraint between the tblJob.JobType and JobType.Name, and make sure that the only entries in the JobType.Name column are those you want to appear in the tblJob.JobType column. On Jun 25, 2005, at 10:28 AM, Chris Andrew wrote: Dear List, My system is RedHat EL3 and MySQL 5.0.7-beta. I wanted to implement a check constraint (below), but after some testing and googling, it seems I can't do this with MySQL. I've read suggestions that check(s) should be done using triggers. Is a trigger a preferred method of achieving the following: CREATE TABLE tblJob ( JobId SMALLINT UNSIGNED NOT NULL, CustomerIdSMALLINT UNSIGNED NOT NULL, JobType VARCHAR(20) NOT NULL DEFAULT 'DesignInstall', Description VARCHAR(100) NOT NULL, QuotationDate DATE NOT NULL, OrderDate DATE, CHECK (JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly')), PRIMARY KEY (JobId, CustomerId) ) TYPE=InnoDB; Regards, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.11/26 - Release Date: 22/06/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.11/26 - Release Date: 22/06/2005 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
Juan Pedro Reyes Molina wrote: With my sql stopped I go to console as root and write: cd /etc/init.d mysql start At this point, try (as root) which mysql It will certainly not be /etc/init.d/mysql, but somewhere in your defined PATH; try echo $PATH to see what that is I would like to learn what's the difference between mysql start and /etc/init.d/mysql start if I'm sitting on /etc/init.d '/etc/init.d/mysql' defines the executable you want to run explicitly; 'mysql' is the first instance of an executable with that name in your PATH. I think this error is preventing mysql from automatically starting on start up. Probably not; look in your error logs for more information on that. And in any case 'mysql' is generally the *client* program; *mysqld* is the server that you want to start. Sounds like your distro has a confusingly named startup file in /etc/init.d. HTH! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
hello, Hassan which mysql gives me /usr/bin/mysql. echo $PATH shows me that /usr/bin is the fourth try. I thougth this was windows like, where PATH is only used if program is not found in active directory. So, I have a script in /etc/init.d called mysql and an executable in /usr/bin also called mysql that takes precedence. I thought that when linux starts all scripts in /etc/init.d where given the start signal. If so I don't understand why mysql remains stopped on linux start up but wake up smoothly when I issue a manual /etc/init.d/mysql start. It looks like a bug in Ubuntu distro. I have tried cp /etc/init.d/mysql /etc/init.d/mysqltmp but issuing /etc/init.d/mysqltmp gives me bash: mysqltmp: command not found Hassan Schroeder wrote: Juan Pedro Reyes Molina wrote: With my sql stopped I go to console as root and write: cd /etc/init.d mysql start At this point, try (as root) which mysql It will certainly not be /etc/init.d/mysql, but somewhere in your defined PATH; try echo $PATH to see what that is I would like to learn what's the difference between mysql start and /etc/init.d/mysql start if I'm sitting on /etc/init.d '/etc/init.d/mysql' defines the executable you want to run explicitly; 'mysql' is the first instance of an executable with that name in your PATH. I think this error is preventing mysql from automatically starting on start up. Probably not; look in your error logs for more information on that. And in any case 'mysql' is generally the *client* program; *mysqld* is the server that you want to start. Sounds like your distro has a confusingly named startup file in /etc/init.d. HTH! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
Juan Pedro Reyes Molina wrote: which mysql gives me /usr/bin/mysql. echo $PATH shows me that /usr/bin is the fourth try. I thougth this was windows like, where PATH is only used if program is not found in active directory. Executables in the 'current working directory' will only be used if your PATH includes a '.' -- and there are different opinions about the wisdom of including that in root's default PATH :-) I thought that when linux starts all scripts in /etc/init.d where given the start signal. If so I don't understand why mysql remains stopped on linux start up but wake up smoothly when I issue a manual /etc/init.d/mysql start. It looks like a bug in Ubuntu distro. Yes to both; again, look in the MySQL log files, and possibly your system log files as well to see if there's something relating to this. HTH, -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
- Original Message - From: Juan Pedro Reyes Molina [EMAIL PROTECTED] To: Hassan Schroeder [EMAIL PROTECTED] Cc: mysql general list mysql@lists.mysql.com Sent: Saturday, June 25, 2005 2:08 PM Subject: Re: starting mysql 4.1.12 on Ubuntu Linux hello, Hassan which mysql gives me /usr/bin/mysql. echo $PATH shows me that /usr/bin is the fourth try. I thougth this was windows like, where PATH is only used if program is not found in active directory. If you wish it, currrent directory (.) should be added to $PATH. export PATH=.:$PATH So, I have a script in /etc/init.d called mysql and an executable in /usr/bin also called mysql that takes precedence. /etc/init.d probably isn't (and maybe shouldn't be) in your PATH. Less confusion if you rename /etc/init.d/mysql to mysqld. I thought that when linux starts all scripts in /etc/init.d where given the start signal. If so I don't understand why mysql remains stopped on linux start up but wake up smoothly when I issue a manual /etc/init.d/mysql start. It looks like a bug in Ubuntu distro. On my Solaris box, there is a directory named /etc/rc2.d. In that directory is a symbolic link to /etc/init.d/mysqld named S99mysqld. This means that the mysql server will be started in init state 2. In /etc/rc1.d is a symbolic link to /etc/init.d/mysqld named K99mysqld. This means that the mysql server will be killed in init state 1. Your /etc/rc directory structure may vary somewhat. ln -s /etc/init.d/mysqld /etc/rc2.d/S99mysqld I have tried cp /etc/init.d/mysql /etc/init.d/mysqltmp but issuing /etc/init.d/mysqltmp gives me bash: mysqltmp: command not found mysqltmp may not be executable. chmod u+x mysqltmp Hassan Schroeder wrote: Juan Pedro Reyes Molina wrote: With my sql stopped I go to console as root and write: cd /etc/init.d mysql start At this point, try (as root) which mysql It will certainly not be /etc/init.d/mysql, but somewhere in your defined PATH; try echo $PATH to see what that is I would like to learn what's the difference between mysql start and /etc/init.d/mysql start if I'm sitting on /etc/init.d '/etc/init.d/mysql' defines the executable you want to run explicitly; 'mysql' is the first instance of an executable with that name in your PATH. I think this error is preventing mysql from automatically starting on start up. Probably not; look in your error logs for more information on that. And in any case 'mysql' is generally the *client* program; *mysqld* is the server that you want to start. Sounds like your distro has a confusingly named startup file in /etc/init.d. HTH! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Searching IN a comma separated list
Hi, Have struggled with this all day, and didn't know where else to ask. If it's not appropriate to the list, I apologise - and advice or pointers would be brilliant, as my head is now hurting! So here's the situation: 3 tables. f_u_groups f_groups and f_images f_u_groups contains the user's groups with the following columns: fuid, fugids, funame fuid is the primary key (auto incremented), funame is the name of the user-group and fuguids contains a comma-separated list of groups (eg 12,13,14,15). This column (fuguids) corresponds to the column gid (primary key) in f_groups. In plain English, fuguids contains a list of groups (for each user), which are then listed in the table f_groups. When images are inserted into f_images (I'm using PHP, and mysql's unique index to prevent duplicates), I need to check against the other two tables to make sure that the *group* the image is labelled as is active. And by active, I mean whether a group is listed inside *any* of the comma-separated lists in fugids. To insert images, a loop is performed over the f_groups table - so this is where I need the magic SQL which I can't work out. Loop over each row in the f_groups - check f_groups.gid *inside* f_u_groups.fugids. I thought IN would do it: SELECT group_name, gid, fugids FROM f_u_groups, f_groups WHERE gid IN (fugids) But that only cross-referenced the first number in the comma-list (fugids) with the groups from f_groups. So it returned 2 group names. Sorry for the *MASSIVELY* and overtly-complicated message. I hope it a) explains my problem and b) someone can decode it! PS incidentally, I could do this quite easily in PHP...using loops, and querying on each number in the lists. But this is obviously massively ineffecient - up to 40 queries for just one simple request! -- Will -- The Corridor of Uncertainty -- -- http://www.cricket.mailliw.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
Where do I look for log file? I have read mysql log file and see no indication of start up with linux, last entry is about prior shutdown. (BTW every time mysql starts it writes on err file: /usr/sbin/mysqld-max: File '/var/log/mysql/mysql.log' not found (Errcode: 13) but directory /var/log/mysql/ do exist) I have found in google dmesg but it shows only harware messages. I have looked in /var/log where there are several log files but see nothing (I expected to see somewhere something like apache2 started, and look there for mysql but see nothing) thanks, Hassan Hassan Schroeder wrote: Juan Pedro Reyes Molina wrote: which mysql gives me /usr/bin/mysql. echo $PATH shows me that /usr/bin is the fourth try. I thougth this was windows like, where PATH is only used if program is not found in active directory. Executables in the 'current working directory' will only be used if your PATH includes a '.' -- and there are different opinions about the wisdom of including that in root's default PATH :-) I thought that when linux starts all scripts in /etc/init.d where given the start signal. If so I don't understand why mysql remains stopped on linux start up but wake up smoothly when I issue a manual /etc/init.d/mysql start. It looks like a bug in Ubuntu distro. Yes to both; again, look in the MySQL log files, and possibly your system log files as well to see if there's something relating to this. HTH, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do you think about PostgreSQL and mysql?
Félix Beltrán wrote: Does any one know how PostgreSQL compares to MySQL regarding stability and maintenance? I have been using MySQL for about two years, and it has proved to be very stable and requires almost zero maintenance. It really depends on what you are using it for. Stability is a relative concept. I use MySQL to hold the bayesian and auto-whitelist data for my Spamassassin server. I find it extremely reliable and low maintenance in that capacity. I use PostgreSQL as the backend for my version control system and I find it extremely reliable in that function. Does that mean they are equally stable? Perhaps it does, as long as you stick to using PostgreSQL and MySQL for the roles they are each best suited for. There is no way I'd reverse the roles of my database servers, though. I wouldn't use PostgreSQL for Spamassassin's bayesian tables any more than I would use a combine to mow my lawn. I also wouldn't use MySQL for my VCS any more than I'd try to take a lawnmower to a wheat field. I honestly don't see that there is much difference in them from a stability and maintainability point of view. I do see there being a fairly large difference in them from a scope and functionality point of view. The gap is closing, though. MySQL is getting more enterprise features and PostgreSQL is getting better in the lean and mean department. I expect that the differences functionality-wise will continue to blur. I expect that each will continue to edge out the other in their current respective fortes. This is, however, getting a little astray from the original question. Kurt. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: starting mysql 4.1.12 on Ubuntu Linux
Hello Jonathan. I have renamed /etc/init.d/mysql to mysqld and added symbolic link to rc2.d. Now it works. I will add symbolic link to rc1.d too. Being this my third day with linux its being a long jump :-) Thank you Jonathan and Hassan for your good help! Jonathan Mangin wrote: - Original Message - From: Juan Pedro Reyes Molina [EMAIL PROTECTED] To: Hassan Schroeder [EMAIL PROTECTED] Cc: mysql general list mysql@lists.mysql.com Sent: Saturday, June 25, 2005 2:08 PM Subject: Re: starting mysql 4.1.12 on Ubuntu Linux hello, Hassan which mysql gives me /usr/bin/mysql. echo $PATH shows me that /usr/bin is the fourth try. I thougth this was windows like, where PATH is only used if program is not found in active directory. If you wish it, currrent directory (.) should be added to $PATH. export PATH=.:$PATH So, I have a script in /etc/init.d called mysql and an executable in /usr/bin also called mysql that takes precedence. /etc/init.d probably isn't (and maybe shouldn't be) in your PATH. Less confusion if you rename /etc/init.d/mysql to mysqld. I thought that when linux starts all scripts in /etc/init.d where given the start signal. If so I don't understand why mysql remains stopped on linux start up but wake up smoothly when I issue a manual /etc/init.d/mysql start. It looks like a bug in Ubuntu distro. On my Solaris box, there is a directory named /etc/rc2.d. In that directory is a symbolic link to /etc/init.d/mysqld named S99mysqld. This means that the mysql server will be started in init state 2. In /etc/rc1.d is a symbolic link to /etc/init.d/mysqld named K99mysqld. This means that the mysql server will be killed in init state 1. Your /etc/rc directory structure may vary somewhat. ln -s /etc/init.d/mysqld /etc/rc2.d/S99mysqld I have tried cp /etc/init.d/mysql /etc/init.d/mysqltmp but issuing /etc/init.d/mysqltmp gives me bash: mysqltmp: command not found mysqltmp may not be executable. chmod u+x mysqltmp Hassan Schroeder wrote: Juan Pedro Reyes Molina wrote: With my sql stopped I go to console as root and write: cd /etc/init.d mysql start At this point, try (as root) which mysql It will certainly not be /etc/init.d/mysql, but somewhere in your defined PATH; try echo $PATH to see what that is I would like to learn what's the difference between mysql start and /etc/init.d/mysql start if I'm sitting on /etc/init.d '/etc/init.d/mysql' defines the executable you want to run explicitly; 'mysql' is the first instance of an executable with that name in your PATH. I think this error is preventing mysql from automatically starting on start up. Probably not; look in your error logs for more information on that. And in any case 'mysql' is generally the *client* program; *mysqld* is the server that you want to start. Sounds like your distro has a confusingly named startup file in /etc/init.d. HTH! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do you think about PostgreSQL and mysql?
As previously posted to this list. http://www.fabalabs.org/research/papers/FabalabsResearchPaper-OSDBMS-Eval.pdf On 6/24/05, stone.wang [EMAIL PROTECTED] wrote: How do you think about PostgreSQL and mysql? want to know which is good? How to choose database for the web? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help you kichstart and troubleshoot any issues you are having. http://www.devshed.com/c/b/MySQL/ http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/ http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php I hope that you find this info useful. Best regards Nils Valentin Tokyo / Japan http;//www.be-known-online.com On Tuesday 14 June 2005 06:58, Yannick wrote: Kevin, In addition to that, the ZORUM database works because when I stop mysql, the following site stops working : http://www.wxy.nl/zorum_3_5/ with the database ZORUM Here PHPadmin doesn't give me any privilege to create anything : http://www.wxy.nl/phpMyAdmin/ I beleive I'm not to far from having it working ut I still have this priviledge issue. BEst regards Yannick -Message d'origine- De : Yannick [mailto:[EMAIL PROTECTED] Envoyé : Monday, June 13, 2005 11:54 PM À : [EMAIL PROTECTED] Cc : mysql@lists.mysql.com Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Kevin, Thanks for your answer. See below the results : * I' really wondering if there is not any missing files. * The mysql.soc file is complettly empty * I can only access myssql when I am not in root. * I can only see 1 database test when I know there is others like zorum which is working * The command Grant doesn't work. The result is that I can never access any database. I have been folowing the installatin process but it still does not work. Do you mind to have a look at the details below and advice on which files I should have a look. Thanks in advance. Yannick fujitsu:/etc # mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # su mysql [EMAIL PROTECTED]:/etc mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye [EMAIL PROTECTED]:/etc mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) [EMAIL PROTECTED]:/etc mysql -u mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye [EMAIL PROTECTED]:/etc su Password: fujitsu:/etc # mysql -u mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # mysql -u yannick ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # su mysql [EMAIL PROTECTED]:/etc mysql -u yannick Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql SET PASSWORD FOR ''@'localhost' = PASSWORD('Yannick'); ERROR 1044: Access denied for user: '@localhost' to database 'mysql' mysql SET PASSWORD FOR 'yannick' = PASSWORD('Yannick'); ERROR 1133: Can't find any matching row in the user table mysql mysql show databases; +--+ | Database | +--+ | test | +--+ 1 row in set
Re: Searching IN a comma separated list
Selon W Luke [EMAIL PROTECTED]: Hi, Have struggled with this all day, and didn't know where else to ask. If it's not appropriate to the list, I apologise - and advice or pointers would be brilliant, as my head is now hurting! So here's the situation: 3 tables. f_u_groups f_groups and f_images f_u_groups contains the user's groups with the following columns: fuid, fugids, funame fuid is the primary key (auto incremented), funame is the name of the user-group and fuguids contains a comma-separated list of groups (eg 12,13,14,15). This column (fuguids) corresponds to the column gid (primary key) in f_groups. In plain English, fuguids contains a list of groups (for each user), which are then listed in the table f_groups. When images are inserted into f_images (I'm using PHP, and mysql's unique index to prevent duplicates), I need to check against the other two tables to make sure that the *group* the image is labelled as is active. And by active, I mean whether a group is listed inside *any* of the comma-separated lists in fugids. To insert images, a loop is performed over the f_groups table - so this is where I need the magic SQL which I can't work out. Loop over each row in the f_groups - check f_groups.gid *inside* f_u_groups.fugids. I thought IN would do it: SELECT group_name, gid, fugids FROM f_u_groups, f_groups WHERE gid IN (fugids) But that only cross-referenced the first number in the comma-list (fugids) with the groups from f_groups. So it returned 2 group names. Sorry for the *MASSIVELY* and overtly-complicated message. I hope it a) explains my problem and b) someone can decode it! PS incidentally, I could do this quite easily in PHP...using loops, and querying on each number in the lists. But this is obviously massively ineffecient - up to 40 queries for just one simple request! -- Will -- The Corridor of Uncertainty -- -- http://www.cricket.mailliw.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hi Will, I think your're in a situtation like the example i give. The problem is work with a join-like between int and varchar. The idea is to split the ugid to a list of integers. mysql select * from groups; +--+ | gid | +--+ |1 | |2 | |3 | | 15 | |9 | +--+ 5 rows in set (0.00 sec) mysql select * from groupsList; +-+ | ugid| +-+ | 1,2,3,4 | | 2,5,6 | | 3,4,5 | | 7,4,9 | +-+ 4 rows in set (0.00 sec) mysql SELECT * - FROM groups - WHERE gid - IN (select ugid from groupsList); +--+ | gid | +--+ |1 | |2 | |3 | +--+ 3 rows in set (0.00 sec) You can see that 15 is not found, but 9 also. This is because gid is an int, and ugid is (certainly like yours) a varchar. what i thought to di is transforming the list of varchar to an array in which mysql must look for the gids. I then write you this query which should give you the idea, and i think the solution : mysql select gid,ugid,FIND_IN_SET(gid,ugid) from groups,groupsList - where FIND_IN_SET(gid,ugid) 0; +--+-+---+ | gid | ugid| FIND_IN_SET(gid,ugid) | +--+-+---+ |1 | 1,2,3,4 | 1 | |2 | 1,2,3,4 | 2 | |3 | 1,2,3,4 | 3 | |2 | 2,5,6 | 1 | |3 | 3,4,5 | 1 | |9 | 7,4,9 | 3 | +--+-+---+ 6 rows in set (0.00 sec) Et voilà. Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CHECK constraint
Selon Michael Kruckenberg [EMAIL PROTECTED]: A trigger is a good place to check the value, and change it, bit I don't believe you can actually generate a MySQL error within the trigger that will prevent the data from being inserted. Currently (unless there's been an update to triggers that's not yet in the docs), you can only change the value before it gets inserted. If you are looking to enforce the values going into your JobType column, you might be better off creating a JobType table, with a foreign key restraint between the tblJob.JobType and JobType.Name, and make sure that the only entries in the JobType.Name column are those you want to appear in the tblJob.JobType column. On Jun 25, 2005, at 10:28 AM, Chris Andrew wrote: Dear List, My system is RedHat EL3 and MySQL 5.0.7-beta. I wanted to implement a check constraint (below), but after some testing and googling, it seems I can't do this with MySQL. I've read suggestions that check(s) should be done using triggers. Is a trigger a preferred method of achieving the following: CREATE TABLE tblJob ( JobId SMALLINT UNSIGNED NOT NULL, CustomerIdSMALLINT UNSIGNED NOT NULL, JobType VARCHAR(20) NOT NULL DEFAULT 'DesignInstall', Description VARCHAR(100) NOT NULL, QuotationDate DATE NOT NULL, OrderDate DATE, CHECK (JobType IN ('DesignOnly', 'DesignInstall', 'InstallOnly')), PRIMARY KEY (JobId, CustomerId) ) TYPE=InnoDB; Regards, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hi, Use enum with a default type and let mysql do the check for you. Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Hi , You did a confusion between root for mysql (wihich is SA or DBA group) and the root of the OS. have you ever installed mysql in windows. there is a root user even in windows. What you must do is to ask the person who installed for the Mysql root password and check the users created in the database. If the root password haven't been set, do it and flush privileges. Selon Yannick [EMAIL PROTECTED]: Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help you kichstart and troubleshoot any issues you are having. http://www.devshed.com/c/b/MySQL/ http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/ http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php I hope that you find this info useful. Best regards Nils Valentin Tokyo / Japan http;//www.be-known-online.com On Tuesday 14 June 2005 06:58, Yannick wrote: Kevin, In addition to that, the ZORUM database works because when I stop mysql, the following site stops working : http://www.wxy.nl/zorum_3_5/ with the database ZORUM Here PHPadmin doesn't give me any privilege to create anything : http://www.wxy.nl/phpMyAdmin/ I beleive I'm not to far from having it working ut I still have this priviledge issue. BEst regards Yannick -Message d'origine- De : Yannick [mailto:[EMAIL PROTECTED] Envoyé : Monday, June 13, 2005 11:54 PM À : [EMAIL PROTECTED] Cc : mysql@lists.mysql.com Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Kevin, Thanks for your answer. See below the results : * I' really wondering if there is not any missing files. * The mysql.soc file is complettly empty * I can only access myssql when I am not in root. * I can only see 1 database test when I know there is others like zorum which is working * The command Grant doesn't work. The result is that I can never access any database. I have been folowing the installatin process but it still does not work. Do you mind to have a look at the details below and advice on which files I should have a look. Thanks in advance. Yannick fujitsu:/etc # mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # su mysql [EMAIL PROTECTED]:/etc mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye [EMAIL PROTECTED]:/etc mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) [EMAIL PROTECTED]:/etc mysql -u mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye [EMAIL PROTECTED]:/etc su Password: fujitsu:/etc # mysql -u mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # mysql -u yannick ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # su mysql [EMAIL PROTECTED]:/etc mysql -u yannick
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Another thing : fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # is normal: try fujitsu:/home/yannick # mysql -u yannick -p Mathias Selon Mathias [EMAIL PROTECTED]: Hi , You did a confusion between root for mysql (wihich is SA or DBA group) and the root of the OS. have you ever installed mysql in windows. there is a root user even in windows. What you must do is to ask the person who installed for the Mysql root password and check the users created in the database. If the root password haven't been set, do it and flush privileges. Selon Yannick [EMAIL PROTECTED]: Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help you kichstart and troubleshoot any issues you are having. http://www.devshed.com/c/b/MySQL/ http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/ http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php I hope that you find this info useful. Best regards Nils Valentin Tokyo / Japan http;//www.be-known-online.com On Tuesday 14 June 2005 06:58, Yannick wrote: Kevin, In addition to that, the ZORUM database works because when I stop mysql, the following site stops working : http://www.wxy.nl/zorum_3_5/ with the database ZORUM Here PHPadmin doesn't give me any privilege to create anything : http://www.wxy.nl/phpMyAdmin/ I beleive I'm not to far from having it working ut I still have this priviledge issue. BEst regards Yannick -Message d'origine- De : Yannick [mailto:[EMAIL PROTECTED] Envoyé : Monday, June 13, 2005 11:54 PM À : [EMAIL PROTECTED] Cc : mysql@lists.mysql.com Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Kevin, Thanks for your answer. See below the results : * I' really wondering if there is not any missing files. * The mysql.soc file is complettly empty * I can only access myssql when I am not in root. * I can only see 1 database test when I know there is others like zorum which is working * The command Grant doesn't work. The result is that I can never access any database. I have been folowing the installatin process but it still does not work. Do you mind to have a look at the details below and advice on which files I should have a look. Thanks in advance. Yannick fujitsu:/etc # mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/etc # su mysql [EMAIL PROTECTED]:/etc mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye [EMAIL PROTECTED]:/etc mysql -u root ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) [EMAIL PROTECTED]:/etc mysql -u mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 to server version: 4.0.15-Max Type 'help;'
Re: Searching IN a comma separated list
On 25/06/05, Mathias [EMAIL PROTECTED] wrote: I then write you this query which should give you the idea, and i think the solution : mysql select gid,ugid,FIND_IN_SET(gid,ugid) from groups,groupsList - where FIND_IN_SET(gid,ugid) 0; +--+-+---+ | gid | ugid| FIND_IN_SET(gid,ugid) | +--+-+---+ |1 | 1,2,3,4 | 1 | |2 | 1,2,3,4 | 2 | |3 | 1,2,3,4 | 3 | |2 | 2,5,6 | 1 | |3 | 3,4,5 | 1 | |9 | 7,4,9 | 3 | +--+-+---+ 6 rows in set (0.00 sec) Et voilà. Hope that helps Brilliant - I wasn't aware of FIND_IN_SET, and that's exactly what I needed. Amazing! Thank you very much indeed - merci beaucoup Mathias, vraiment. -- Will -- The Corridor of Uncertainty -- -- http://www.cricket.mailliw.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Mathias, Did what you asked : [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 134 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql It works only if I put NO password. If I put the password of yannick it doesn't work. But here as well, I must confuse the username yannick in mysql and the user yannick in linux. I can not ask the administrator what password he put because I am the administrator of this computer !! :)) Also, I have just installed MysqlAdministrator and here as well, I can not access the server... Same error messages. How can I add set the root password ? How can I flush the privilidges ? Thanks Yannick -Message d'origine- De : Mathias [mailto:[EMAIL PROTECTED] Envoyé : Sunday, June 26, 2005 12:01 AM À : Mathias Cc : [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com; [EMAIL PROTECTED] Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Another thing : fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # is normal: try fujitsu:/home/yannick # mysql -u yannick -p Mathias Selon Mathias [EMAIL PROTECTED]: Hi , You did a confusion between root for mysql (wihich is SA or DBA group) and the root of the OS. have you ever installed mysql in windows. there is a root user even in windows. What you must do is to ask the person who installed for the Mysql root password and check the users created in the database. If the root password haven't been set, do it and flush privileges. Selon Yannick [EMAIL PROTECTED]: Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help you kichstart and troubleshoot any issues you are having. http://www.devshed.com/c/b/MySQL/ http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/ http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php I hope that you find this info useful. Best regards Nils Valentin Tokyo / Japan http;//www.be-known-online.com On Tuesday 14 June 2005 06:58, Yannick wrote: Kevin, In addition to that, the ZORUM database works because when I stop mysql, the following site stops working : http://www.wxy.nl/zorum_3_5/ with the database ZORUM Here PHPadmin doesn't give me any privilege to create anything : http://www.wxy.nl/phpMyAdmin/ I beleive I'm not to far from having it working ut I still have this priviledge issue. BEst regards Yannick -Message d'origine- De : Yannick [mailto:[EMAIL PROTECTED] Envoyé : Monday, June 13, 2005 11:54 PM À : [EMAIL PROTECTED] Cc : mysql@lists.mysql.com Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Kevin, Thanks for your answer. See below the results : * I' really wondering if there is not any missing files. * The mysql.soc
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Since you can connect as yannick without password, just set it after login : mysql SET PASSWORD FOR 'yannick'@'localhost' = PASSWORD('newpass'); see http://dev.mysql.com/doc/mysql/en/set-password.html for more details. I advice to set it to another password than your yannick linux one. Mathias Selon Yannick [EMAIL PROTECTED]: Mathias, Did what you asked : [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 134 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql It works only if I put NO password. If I put the password of yannick it doesn't work. But here as well, I must confuse the username yannick in mysql and the user yannick in linux. I can not ask the administrator what password he put because I am the administrator of this computer !! :)) Also, I have just installed MysqlAdministrator and here as well, I can not access the server... Same error messages. How can I add set the root password ? How can I flush the privilidges ? Thanks Yannick -Message d'origine- De : Mathias [mailto:[EMAIL PROTECTED] Envoyé : Sunday, June 26, 2005 12:01 AM À : Mathias Cc : [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com; [EMAIL PROTECTED] Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Another thing : fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # is normal: try fujitsu:/home/yannick # mysql -u yannick -p Mathias Selon Mathias [EMAIL PROTECTED]: Hi , You did a confusion between root for mysql (wihich is SA or DBA group) and the root of the OS. have you ever installed mysql in windows. there is a root user even in windows. What you must do is to ask the person who installed for the Mysql root password and check the users created in the database. If the root password haven't been set, do it and flush privileges. Selon Yannick [EMAIL PROTECTED]: Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help you kichstart and troubleshoot any issues you are having. http://www.devshed.com/c/b/MySQL/ http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/ http://www.php-mysql-tutorial.com/mysql-tutorial/add-new-mysql-user.php I hope that you find this info useful. Best regards Nils Valentin Tokyo / Japan http;//www.be-known-online.com On Tuesday 14 June 2005 06:58, Yannick wrote: Kevin, In addition to that, the ZORUM database works because when I stop mysql, the following site stops working : http://www.wxy.nl/zorum_3_5/ with the database ZORUM Here PHPadmin doesn't give me any privilege to create anything : http://www.wxy.nl/phpMyAdmin/ I beleive I'm not to far from having it working ut
Re: Searching IN a comma separated list
Vous être le bienvenue :o) Selon W Luke [EMAIL PROTECTED]: On 25/06/05, Mathias [EMAIL PROTECTED] wrote: I then write you this query which should give you the idea, and i think the solution : mysql select gid,ugid,FIND_IN_SET(gid,ugid) from groups,groupsList - where FIND_IN_SET(gid,ugid) 0; +--+-+---+ | gid | ugid| FIND_IN_SET(gid,ugid) | +--+-+---+ |1 | 1,2,3,4 | 1 | |2 | 1,2,3,4 | 2 | |3 | 1,2,3,4 | 3 | |2 | 2,5,6 | 1 | |3 | 3,4,5 | 1 | |9 | 7,4,9 | 3 | +--+-+---+ 6 rows in set (0.00 sec) Et voilà. Hope that helps Brilliant - I wasn't aware of FIND_IN_SET, and that's exactly what I needed. Amazing! Thank you very much indeed - merci beaucoup Mathias, vraiment. -- Will -- The Corridor of Uncertainty -- -- http://www.cricket.mailliw.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL help
Can someone tell me why this query works... SELECT UserKey FROM( SELECT UserKey, Count(GiftKey) Gifts FROM Gift Group BY UserKey ) GC WHERE GC.Gifts = 3 And this one doesn't? SELECT UserKey, UserID, FROM User WHERE UserKey IN (SELECT UserKey FROM( SELECT UserKey, Count(GiftKey) Gifts FROM Gift Group BY UserKey ) GC WHERE GC.Gifts = 3 ) In case you need some back ground and want to know what I eventually want to get read on... I have a DB of Users of my wish list site. The tables I have are User info about the users UserKey is the key Gift list of gifts each user has on their wish list foreign key is UserKey Event ---gift giving events for users. foreign key is UserKey Emails email addresses users have sent a message to about their wish list. UserKey is the foreign key here too. The relationship between user and the other 3 tables is a 1 to many. I have the following query that I need to adjust some. SELECT u.UserKey, UserID, Count(distinct g.GiftKey) gifts, Count(distinct ev.EventKey) events, Count(distinct e.Email) Emails FROM User u NATURAL LEFT JOIN Gift g LEFT JOIN Emails e ON e.Userkey = u.UserKey LEFT JOIN GiftGivingEvent ev ON ev.UserKey = u.UserKey GROUP BY UserID What I really want is only the users where the gifts count is 3, the Event count is 1, the Emails count is 5 and and only count emails if e.Verified is = 1 I am pretty sure I have to write code to do the last part with the emails but is there a way to do the part with the gift and event counts? -- Chris W Gift Giving Made Easy Get the gifts you want give the gifts they want http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam
Mathias, I would love to do it but this is the answer : mysql SET PASSWORD FOR 'yannick'@'localhost' = PASSWORD('test'); ERROR 1133: Can't find any matching row in the user table mysql I also succeeded to enter with mysqladministrator. (Without password !) The strange thing is that when I go to user admin he tells me: could not retrieve user privilege info . It looks like there is not file for username and passwords. If I try to add a user, the program shut. Where should I check if there is such user file file ? Yannick -Message d'origine- De : Mathias [mailto:[EMAIL PROTECTED] Envoyé : Sunday, June 26, 2005 12:36 AM À : [EMAIL PROTECTED] Cc : [EMAIL PROTECTED]; mysql@lists.mysql.com; [EMAIL PROTECTED] Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Since you can connect as yannick without password, just set it after login : mysql SET PASSWORD FOR 'yannick'@'localhost' = PASSWORD('newpass'); see http://dev.mysql.com/doc/mysql/en/set-password.html for more details. I advice to set it to another password than your yannick linux one. Mathias Selon Yannick [EMAIL PROTECTED]: Mathias, Did what you asked : [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) [EMAIL PROTECTED]:~ mysql -u yannick -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 134 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql It works only if I put NO password. If I put the password of yannick it doesn't work. But here as well, I must confuse the username yannick in mysql and the user yannick in linux. I can not ask the administrator what password he put because I am the administrator of this computer !! :)) Also, I have just installed MysqlAdministrator and here as well, I can not access the server... Same error messages. How can I add set the root password ? How can I flush the privilidges ? Thanks Yannick -Message d'origine- De : Mathias [mailto:[EMAIL PROTECTED] Envoyé : Sunday, June 26, 2005 12:01 AM À : Mathias Cc : [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com; [EMAIL PROTECTED] Objet : RE: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Another thing : fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # is normal: try fujitsu:/home/yannick # mysql -u yannick -p Mathias Selon Mathias [EMAIL PROTECTED]: Hi , You did a confusion between root for mysql (wihich is SA or DBA group) and the root of the OS. have you ever installed mysql in windows. there is a root user even in windows. What you must do is to ask the person who installed for the Mysql root password and check the users created in the database. If the root password haven't been set, do it and flush privileges. Selon Yannick [EMAIL PROTECTED]: Nils, Thanks for your support but still not working. All I need is to have MYSQL installed with a root password. For exemple, I can never login when I am a root user. I always need to be a user like yannick I can also not make any request other the localhost as when I add -h fujitsu, he makes re request on fujitsu.local. How can I check the 4 databases to see what host has been used for which username ? If needed, I can also give you a telnet session to check what is going wrong. I have already installed it 3 times and always the same result... I don't beleive on an installation problem but on an authentification issue. Thanks for you support. Yannick See details below: [EMAIL PROTECTED]:~ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 111 to server version: 4.0.15-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql fujitsu:/home/yannick # mysql ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) fujitsu:/home/yannick # = If I have no access with root, I can not create any new database That is the problem. -Message d'origine- De : Nils Valentin [mailto:[EMAIL PROTECTED] Envoyé : Saturday, June 18, 2005 2:57 PM À : mysql@lists.mysql.com; [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Objet : Re: [SPAM] - Unable to install mysql - Bayesian Filter detected spam Hi yannick, Not sure if you have found the problem yet, any way there are many tutorials online which explain how to proberly setup user accounts. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] yannick etc. are all separate users with different rights. So the combination of username, hostname and password is to be thought of as a set. have alook at below links, which I hope help
Re: CHECK constraint
Hi, Use enum with a default type and let mysql do the check for you. The problem with an enum is that if you insert a value that's not in the enum, MySQL doesn't stop the insert, it leaves the column empty. This doesn't enforce data integrity like I think Chris wanted. mysql desc enum_test; +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | id| int(11) | YES | | NULL| | | name | enum('test1','test2') | YES | | test2 | | +---+---+--+-+-+---+ 2 rows in set (0.25 sec) mysql INSERT INTO enum_test VALUES (1,'test3'); Query OK, 1 row affected, 1 warning (0.29 sec) mysql SELECT * from enum_test; +--+--+ | id | name | +--+--+ |1 | | +--+--+ 1 row in set (0.00 sec) Mike Kruckenberg [EMAIL PROTECTED] ProMySQL Author http://www.amazon.com/exec/obidos/ASIN/159059505X -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MAC OS X backup after crash
So far this was what I did, Took all files i.e frm, MYI and MYD files from the new server. Created a database like on another box running the version of mysql the old server was running and pasted them in the data folder of the database I created and viola - they all showed up, so i think it was a compatability issue. Now - I don't want to un-install mysql on the new server so I did a dump from the test server and tried to import it but it encountered some errors on the way and imported only 9 tables out of 14. So, I dumped table by table and imported table by table and was able to import 12 tables and found out the tables that were giving problems. They are syntax errors, however - I have been battling with them over the past 8 hours, everything seems right to me and they run on the old version of mysql I copied the frm, MYD and MYI files to - but when I did a dump to the same server on another database or the new server - it gives the ff errors. 1. CREATE TABLE xrates ( date date default NULL, time time NOT NULL default '00:00:00', amount_from decimal(15,5) NOT NULL default '0.0', currency_from char(6) NOT NULL default '', amount_to decimal(15,5) NOT NULL default '0.0', currency_to char(6) NOT NULL default '', order tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY date (date,currency_from,currency_to) ) TYPE=MyISAM; MySQL says ERROR 1064: You have an error in your SQL syntax near 'order tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY date (date,currency' at line 8 2. CREATE TABLE user_log ( id mediumint(8) NOT NULL auto_increment, number varchar(7) NOT NULL default '', when timestamp(14) NOT NULL, what varchar(255) NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; MySQL says ERROR 1064: You have an error in your SQL syntax near 'when timestamp(14) NOT NULL, what varchar(255) NOT NULL default '', PRIMARY ' at line 4 Plz assist. __ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MAC OS X backup after crash
Alla-amin wrote: So far this was what I did, Took all files i.e frm, MYI and MYD files from the new server. Created a database like on another box running the version of mysql the old server was running and pasted them in the data folder of the database I created and viola - they all showed up, so i think it was a compatability issue. Now - I don't want to un-install mysql on the new server so I did a dump from the test server and tried to import it but it encountered some errors on the way and imported only 9 tables out of 14. So, I dumped table by table and imported table by table and was able to import 12 tables and found out the tables that were giving problems. They are syntax errors, however - I have been battling with them over the past 8 hours, everything seems right to me and they run on the old version of mysql I copied the frm, MYD and MYI files to - but when I did a dump to the same server on another database or the new server - it gives the ff errors. 1. CREATE TABLE xrates ( date date default NULL, time time NOT NULL default '00:00:00', amount_from decimal(15,5) NOT NULL default '0.0', currency_from char(6) NOT NULL default '', amount_to decimal(15,5) NOT NULL default '0.0', currency_to char(6) NOT NULL default '', order tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY date (date,currency_from,currency_to) ) TYPE=MyISAM; MySQL says ERROR 1064: You have an error in your SQL syntax near 'order tinyint(1) unsigned NOT NULL default '0', UNIQUE KEY date (date,currency' at line 8 order is a reserved word (ORDER BY). You'll have to change the column name or quote it (with backticks) nearly *every* time you use it. `order` tinyint(1) unsigned NOT NULL default '0', 2. CREATE TABLE user_log ( id mediumint(8) NOT NULL auto_increment, number varchar(7) NOT NULL default '', when timestamp(14) NOT NULL, what varchar(255) NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; MySQL says ERROR 1064: You have an error in your SQL syntax near 'when timestamp(14) NOT NULL, what varchar(255) NOT NULL default '', PRIMARY ' at line 4 when is also a reserved word (CASE...WHEN...). Change it or quote it: `when` timestamp(14) NOT NULL, Plz assist. See the manual for more http://dev.mysql.com/doc/mysql/en/reserved-words.html. Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]