Problem Logging In Using Mysql Password Function
I have a test server on a windows box with php 4.3.10 and mysql 4.1.10-nt. I built a login app and It works well using the mysql password('') function. Unfortunately I ported the app to a freebsd box running php 4.3.10 and mysql 4.1.12. The passwords come out differently and I don't understand why.
For instance, the password test looks like "378b243e220ca493" on the windows box and the freebsd database entry look like "*94BDCEBE19083CE". As you can see, very different. And this causes a lockout from logging in.
Instead of being routed to a "safe" login page, the error for a wrong username/password combo shows up.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mysql Appears To Have Changed The 'password' Function Hashing
I've been using Mysql for about 6 months but in fairly basic fashion. For a cms I have built, I have a users table, with userName and password fields. An admin can create new users, and the password is hashed using the PASSWORD() function. SQL: "INSERT INTO users VALUES ('', '$userName', PASSWORD('$userPwd')) Straight out of the book basically. Now the problem is that all this has been functioning fine on a couple of sites on external servers, plus a couple of local machines. Until today, on my main dev machine - yesterday a user could log in, today they couldn't. As far as I can tell, nothing has changed. But when I look at the hashes in the database table, they are 41 chrs, and when I add a new user, the hash is 16 characters. I know that at some stage the hash length was increased between mysql versions, but I have not updated the install (I run XAMPP for Windows 1.4.14, which appears to install php 5.0.4 and mysql 4.1.12) Is there any other reason that the hash length could change to 16? I'd like to know why this happened so that I'm prepared if it happens on the server (where it is not so easy to hack in and add new users that can log in again)
Warning: Mysql_connect() [function.mysql-connect]: Access Denied For User 'debscrof'@'localhost' (using Password: NO)
Have MySQL on a VPS running CPanel MySQL v4.1.22-standard Can access MySql fine through CPanel, phpMyAdmin etc all work fine, creating databases, deleting databases, adding users etc However, when I try to use MySql from a website, it fails I created a user "test1" (which then got the username "debscrof_test1" from CPanel), a password for the user "test2", and then added the user to a new database "testdb" with all priviliges Then a simple script to connect to the database (as I am trying to locate the source of the errors), as per below: <?php $dbhost = "localhost"; $dbuser = "debscrof_test1"; $dbpass = "test2"; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'debscrof_testdb'; mysql_select_db($dbname); ?> Have tried with " and ' around the values, with 127.0.0.1 as the host... still with the same error message: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'debscrof'@'localhost' (using password: NO) in /home/debscrof/public_html/testdb.php on line 6 Error connecting to mysql ...any suggestions why I cannot connect? (and why it says password: NO)!
Password() Function
I've created a simple table called users. This table contains four columns. First_Name, Last_Name, User_Name, Password. I've used the password() function when inserting a user. I have read the documentation on using other types of encryption, but it's killing me that I can't get this to work. Robert has a User_Name of "Bob" and a password of password('tomato'). =============================== HOW I ADDED BOB insert into users values("Robert","Evans","bob",password('tomato')); 1 row added yada yada HOW I QUERY BOB select * from users where User_Name="bob" and password=password('tomato'); Empty Set =============================== That exact same query is in a tutorial for a simple PHP login form, but an empty set is returned even in the command prompt using MySQL by itself, therefore the script cannot move on.
PASSWORD() Function
I'm writing a login.php script for my web site and am encountering some problems matching the password of the user logging in. Here's some of my code where I believe the problem to be: $query = "SELECT user_id, first_name FROM users WHERE username='$u' AND password=PASSWORD('$p')"; echo($query); $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_NUM); if ($row) { // Start the session, register the values & redirect. session_start(); $_SESSION['first_name'] = $row[1]; $_SESSION['user_id'] = $row[0]; header ("Location: [url]http://"[/url]; . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/loggedin.php"); exit(); } else { $message = '<p>The username and password entered do not match those on file.</p>'; } mysql_close(); } else { $message .= '<p>Please try again.</p>'; } } I keep getting my error message "The username and password entered do not match those on file" listed above in the conditional. The server doing my hosting is running MySQL 4.1.14 - standard. The test login script that is getting passed prints out as follows: SELECT user_id, first_name FROM users WHERE username='test' AND password=PASSWORD('test1') Am I doing something wrong with the PASSWORD() function?
Mysql Password() & Unix Crypt Password...
I am creating a user administration system where system administrator can activate services for a user, like webspace, a mail account or a subdomain. I now want to create a function that creates mysql databases and grant the right privileges to a user. But the problem is that mysql wants to have the plaintext password for the user in the "grant ... identified by 'pwd'" field, or in a manual query to update the password in the mysql.user table with PASSWORD('pwd'). I have another database which holds the passwords for the users, these password are stored the moment a user signs up and are used to activate services, for example ssh access to the machine. The stored passwords are encrypted using crypt(). So for adding a ssh service to a user, I simply do echo "$user:$pwdhash" | chpasswd -e. I have chosen crypt because some programs (like proftpd) don't take md5 sums. The problems is that I don't have the plaintext password. So I cannot add a mysql db. So I need to create a user in mysql with a crypt password. I tried to just "grant all privileges ... identified by 'nothing'" and then afterwards update the mysql.user table and putt the crypt password in there but it doesn't work like that. Does anyone have any idea on how I could fix this, how can I create a user in mysql without having his plaintext password and only having a crypt hash of it. I thought about not only storing a crypt hash, but also an md5 hash and a mysql PASSWORD() hash.. but I think that's an ugly solution.
IIS Logging To Mysql?
Can you setup mysql ODBC so that IIS can log into mysql? if so is there any good article/ instructions on the setup?
MySQL 5 Logging
I've installed MySQL Server 5.0 on Win2K IIS as well as PHP 5.0. PHP works fine, and so does MySQL...the problem is that I can't get the two to talk to each other
Logging On And Off MySQL
How does MySQL manage connections/sessions that are not formally and properly closed? What are the possible negative consequences if many of the software/operators on the client side fail to properly close the sessions they open? Will the MySQL server be able to handle this gracefully? Or will they consume server resources until the system crashes? Will the open sessions eventually time out close automatically? Is there a timeout value that can be set on the server? Can one query the server for information about open connections?
MySQL Logging Out
I'm not sure if this is related to MySQL or just happens to be occuring with MySQL on the Linux box, but MySQL will -- at random intervals -- log out without my explicit action and be followed by this message [X]+ Stopped mysql -u <user> -p <database> (where X is a number) Now I don't have admin or root access to this server, but is there anything I can do or talk about with the administrator?
Logging On To MySQL - Problem
I'm trying to log on to MySQL for the first time. I only installed MySQL and PHP for the first time yesterday. When I click on the mysql.exe (in C:Program FilesMySQLMySQL Server 5.0in) nothing happens. I thought I was meant to get a command prompt to type in my username and pw. The following actually happens to me: I double click on it, the command box opens for about 2 seconds and then closes down.
Mysql Logging Compiled In?
i'm trying to turn on mysql logging as follows, but it doesn't seem to work: mysqld --log=/root/log the logfile never shows up after a connection or query. so i want to know if logging support is compiled into mysql. i did not install it and i cannot ask the hoster. does anyone know how to check that? i don't even know where to begin.
Mysql Logging Compiled In?
i'm trying to turn on mysql logging as follows, but it doesn't seem to work: mysqld --log=/root/log the logfile never shows up after a connection or query. so i want to know if logging support is compiled into mysql. i did not install it and i cannot ask the hoster. does anyone know how to check that? i don't even know where to begin.
Logging Queries On MYSQL
I am running Red Hat and MySQL, I am needing to make it that mysql logs all queries done on the server, at the moment my /etc/my.cnf file looks like this. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysql] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid What do I need to do to accompish this , I have looked on google and just cant find the answer at all to this.
MySql Change Logging
Is it possible for me to have the daily updation and insert queries performed on the MySQL DB saved? This will help me track when a particular record was modified in the DB. Is there any other way to track as to when the changes were made to the DB? I also want to add who made the changes but this will come at a later stage once the user login is implemented.
Logging MySql Statements
My server load goes up to 100 and I don´t know why. What I know, if I shot down the site, the server calms down and it works again. I have figured out that i have a mysql problem but I can t figure it out. Is it possible to log all MySql Statements which are running on my database ? If the server goes strange again I could check the log file for the problem.
Logging Using The Mysql Command
Unfortunately, I was experimenting and I changed the field Host in table User from localhost to %. Now I can no longer logon via the mysql -u root command. It wants to log on as root@localhost and I want to log on as root@%. How do I fix my mistake?
Can't Limit /var/log/mysql Logging
Mysql is filling my /var partition because the log limit doesn't seem to be respected. I've tried many different settings in /etc/mysql/my.cnf but nothing works. Logrotate is not enabled/configured. I just want mysql to use a maximum of, let's say, 1GB of my /var partition The log is /var/log/mysql/ Debian GNU/Linux 4.0 kernel 2.4.27-2-386 mysql version 5.0.30-Debian_1-log Following the /etc/mysql/my.cnf file Code:
Logging MySql Statements
My server load goes up to 100 and I don´t know why. What I know, if I shot down the site, the server calms down and it works again. I have figured out that i have a mysql problem but I can t figure it out. Is it possible to log all MySql Statements which are running on my database ? If the server goes strange again I could check the log file for the problem.
MySQL Logging And Encryption
If logging is turned on, is there a way to disable it for a given query? IE. If I query --> select AES_ENCRYPT("This is very important data", "lessthansecretkey"); Then my key and the value I'm trying to encrypt is visible in the log files.
Enable Mysql Logging
how common it is for production websites (sites that get used frequently) such as small online stores etc, to enable logging on the database end. Is it that common ? Seems like it might be a performance hit and maybe it might be a good idea only if one suspected something wasnt right (cyber attacks). Any php / mysql errors will be hopefully caught and logged by other means, so the only reason i see to log database action is for seeing just who is trying to get access.
Disable MySQL Logging
I was a bit surprised, when I saw that mySQL create a huge logs, entierly useless for my testing server purpose and since the machine is relatively (a lot, VIA C is nowhere near fast) slow, I looking for ways how to completely disable these unnecessary logging It is a Win2k server with mySQL 4.1.15-nt :-) PS. how to convince the service to use as default latin2 coding? --default-character-set=latin2_czech_ci Is mentioned into the guide, but the server did not accept it at all in properties and trying to set it into the ini file was undocumented and sometimes cause mySQL not to start + it still not working and use the damn utf8 crap, that kill the czech characters :(((
Mysql Logging Compiled In
i'm trying to turn on mysql logging as follows, but it doesn't seem to work: mysqld --log=/root/log the logfile never shows up after a connection or query. so i want to know if logging support is compiled into mysql. i did not install it and i cannot ask the hoster. does anyone know how to check that? i don't even know where to begin.
Logging Queries On Mysql With FreeBSD
I am trying to set up my mySQL server on FreeBSD to log every query a user runs. I understand I must edit the my.cnf file. But one does not exist for my install. I installed mySQL from the FreeBSD packages and for some reason, it did not create a my.cnf file in /etc or anywhere. Where can I set it up to log every query a user runs?
Trouble Logging Into MySQL Administrator
I've installed MySQL and it appears to running properly because I can enter data in the command line format but I'd like to use the graphical user interface of MySQL Administrator. When I try to log in, I can not get through. Is there someplace on the MySQL website that I can go to send me a reminder of the information I used to set-up the server and how to properly fill-out this form? When I hit contol and skip, it shows that my server is running. I did save the original information I gave on the website during the server configuration and download procedures but when I try different combinations of this information, I'm still not able to access the Administrator functions.
How Do I Turn On Logging To View Errors In MySQL 5
I'm a new MySQL user. Just switched over from the Bill Gates world and am joining the open source side finally. I setup a website using Joomla! 1.x with PHP5 and MySQL 5 on the backend. However when I submit a post in my forum on my new site, the page goes blank yet says it's finished loading. In the Microsoft world you can echo back to the screen errors and figure out which row, record or table was causing the error. Can you do the same using MySQL or does it have a logging feature that could help me troubleshoot and see why my posts are hanging when hitting the submit button via my browser?
How Do I Start Logging On Windows Live MySQL Server?
As I understand it, the server has to be shut down for the logging to be successfully started. Is this correct? I have been experimenting on a local MySQL server to make sure I know what to do on the production server. My production server has a my.ini file at the location c:Program FilesMySQLMySQL Server 4.1my.ini with various config stuff in it. Would it be ok for me to add the following under the [mysqld] part of the file: log=/logs/mysqld.log Thus creating a file named 'mysqld.log' in the folder 'logs'. The main things I need to log are the SQL Statements being executed and the IP Addresses/hostname of the connections. What type of log would be best for this? Also how do I make it so that the log doesn't grow ridiculously large?
IF Function,GROUP BY,aggregate Function Problems
Yep, I have all those problems in the title. So I'll explain each one at a time - I did have another thread relating to this very same query but I thought it was time to update where I am with the query because at the moment I feel like I am getting nowhere! The query I have basically searches through an items_ordered table through each product and checks to see whether the item is VATable or not. This is not where I have the problem though. Where I am really having the first problem is when I am trying to use the IF function to check if the TOTAL of an order is over £300. IF it is then I multiply it my 0.95 (i.e. 5% off). With the query below I get no errors but neither do I get the desired result. It's as though it couldn't even see it. =....
Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords. I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.
I Can Connect With Db Password Or Blank Password
I have a password setup for root (% and localhost) in Mysql 5.0.26, I can connect ok no problem. I can also connect with blank password! I know it is checking the password cuz it fails if it's wrong. I'm sure I have only one account as well (tried to delete, recreate, etc... no change) select * from user where user='root'; | localhost | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... | % | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... Is there an option to accept blank password!? I have this problem only for root user; Other accounts are fine.
Logging In
I'm having trouble logging into my sql server, I'm running version 4.0 just about anything I type in gives me this error message "Error SQL query: mysql MySQL said: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql' at line 1 " Can anyone help me with this problem?
Logging
Is there a way to turn on some sort of logging? I am attempting to connect to a db through VB, just learned it and am not sure if I am getting in and not retrieving data or not even getting in yet. Can this be done through the console and then left on?
Mysql Function
i am hosting my website on a hosting website server. I made Mysql database there. I noticed one thing when i insert data in tables they have a colum called "function" with drop down box where they have values like ASCII,CHAR,SOUNDEX, UCASE, LCASE, COUNT,AVG any many other. I don't pick any of them. But I am just wondering if I need to pick either ASCII or char?
MYSQL Function For 'or'?
In the context of a where statement, what is the correct way to say 'or' as in the following: SELECT * FROM table WHERE field1 [or] field 2 LIKE "%$query%" This is for a basic search feature where people are tending to misspell words, I'd like to add a search words column that will also be searched.
Mysql 4 Function From A Mysql 5 Function
I found this function on the mysql website : CREATE FUNCTION substrCount(x TEXT, delim varchar(100)) RETURNS int RETURN (length(x) - length(REPLACE(x, delim, ''))) / length(delim); That works perfectly with mysql 5. But when I try to import this to mysql 4, I have an error : suse-server:/partages # mysql mybase <function-add.sql> output.tab ERROR 1064 (42000) at line 1: You have an error IN your SQL syntax; CHECK the manual that corresponds TO your MySQL server version FOR the RIGHT syntax TO USE near '(x TEXT, delim varchar(100)) returns int return (length(x)-length(REPLACE(x, del' at line 1
Mysql Function
is there any function in mysql which tells you what the last row inserted into a table is?
Function In MYSQL
I am using MYSQL 5.0.22. My database name is 'normal'. It could contain 2 tables, such as Itemgroup & Itemlist. I tried with the FUNCTION query for Concatination purpose. Funtion name is Serial, The Query is, CREATE FUNCTION Serial (s CHAR(10)) RETURNS CHAR(25) RETURN CONCAT('SALES',s,'IND'); It would say the error as followes, ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'normal' Is the Query right or wrong? or How will I used (or) handiled the FUNCTION option? If any one knows, please guid me
How Do I Set Query Logging
I have a situation where my database is deleting records. I would like to enable logging but this produces a huge text file. Also I am not sure how to read the results. I am using MySQL 3.23 (the IT department won't upgrade). Can anyone tell me the most efficient way to set logging for a specific database? I just need to monitor whether a process is deleting these records. Also how would I read this information? Are there any known problems like this with MySQL 3.23?
Query Logging?
I cannot get my query logging to work. I put log=hostname.log in my.ini and at some point it WAS recording a log, but it since stopped. I started the service, stopped the service, did everything. I logged into my machine as admin, as the user, did it all again... cant get it to work. I am running mysql 5 as part of the XAMPP stack. I installed it on this machine as admin and can run it as a service, but I cant get the log to work. Any help would be appreciated. I really need to see what SQL is being executed.
Logging On For The First Time
I've downloaded the XP Windows standard version, installed it and logged on without a problem. I've also downloaded the Linux standard version, installed it(Mandriva 2000 powerpack), and attempted to log on. However, I keep getting a message telling me that it can't find a socks in /var(whatever that is).
Logging In To Monitor Thru Dos
I am playing around with logging in and running commands through batch files on a win2000 machine running mysql, I have a password on my db, I am using mysql -h localhost -u root -p to start up the monitor this works, but it asks for a password which kind of kills the automated part of what I am wanting to do, is there a way to include the password on this command? I thought about passing the password using %1, but I haven't done dos in so long that I dont even know if this feature still works, does anybody?
Logging Problem
I have a problem with mysql general log, regarding query logging. I'm running Win2K, mysql 4.1.10 with JBoss 4.0.2. When I turn on logging, the statements executed from JBoss and logged by mysql look like this: SELECT uuid from tablex AS a WHERE a.id = ?; MySQL never logs the parameters of the statements. Can somebody tell me how to turn this on or what I am missing here?
How Do I Enable Logging?
I need to enable MySQL logging. I looked in the my.ini file and did not see any logging options. Where do I turn on logging? I am using Windows.
Logging Into Server
I have a linux box with MySQL. The following fails. If I try to login locally using mysql -u USERNAME -p If I go to another computer on the network and try using the same user name and password by: mysql -h SERVER ADDRESS -u USERNAME -p This login is successful. Does anyone know why the first operation fails?
Logging With Trigger
I am designing a chatsystem with logging-functionality. And i want to handle the logging-stuff within a trigger. As a procedure the code works, so the syntax in ok. As a trigger i get no errors but nothing is logged. create trigger messages_insert before insert on messages for each row begin declare a tinyint(1) unsigned; select logging into a from users where id = 1; if a = 1 then insert into logfile set content = 'A'; end if; end
Logging In / Cookies
I've been writing some code for site I'm creating, and I got stumped this far in. I have my login code, and it works, sorta - the page that displays right after logging in says that I'm logged in, but the I guess the session is destroyed after that. I'm sort of fighting blindly here - I just started learning PHP a few months ago and don't know much about sessions and cookies yet. Here's the code that processes the login form; I originally borrowed it from an open-source browser-based RPG (which is why users are referred to as 'players'), but now only about lines 7-17 are the same. Also, it worked fine for that game, so I don't know what's wrong here. Code:
Logging Into Server
I am running Mac OS X 10.4 (PPC) I have installed MySQL server and have the use account mysql but I have no idea of the password. When the install ran it did not give me the opportunity to set a password and I can not find anywhere that states a default password.
Logging Doesn't Work
I have WinXP, and MySQL 5.0.18 running as a service. I followed the instructions for setting up general query log file (mysqld --log), and the file was created (Nebo.log), but it does not display any logs. This is all I have after executing a few queries: Nebo.log mysqld, Version: 5.0.18-log. started with: Tcp port: 3306 Unix socket: (null) Time Id Command Argument Can anyone offer any help?
Using A Database For Logging
I need to log the number of "brochure Requests" on a per Region, Per date basis. eg for say 20 Regions , have a 366 columns (one per day of the year). Obviously I can write a script to Create all the tables, but it seems kind of clumsy. Do arrays exist in Mysql? It might also be easier to organise it into 52 weeks of 7 days. How do I design the tables?
Stats Not Logging
My stats arnt being logged. Page loads with no errors.. $update = "UPDATE `log` SET hits='hits + 1' WHERE ip='$ip' AND date='$date'"; if (mysql_query($update) or die(mysql_error()) ) { } elseif($logged[username]) { mysql_query("INSERT into log (ip, hits, date, user) VALUES ('$ip', '1', '$date', '$logged[username]'" or die(mysql_error()) ); } else{ mysql_query("INSERT into log (ip, hits, date, user) VALUES ('$ip', '1', '$date', '$user'" or die(mysql_error()) ); }?
|