mysql-management

How to set root password to null

老子叫甜甜 提交于 2019-12-17 07:01:46
问题 How can I change the password for root user of MySQL to null -- meaning no password or '' -- from the MySQL command line client? 回答1: You can recover MySQL database server password with following five easy steps. Step # 1 : Stop the MySQL server process. Step # 2 : Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password. Step # 3 : Connect to mysql server as the root user. Step # 4 : Setup new mysql root account password i.e.

How to make mysql accept connections externally

∥☆過路亽.° 提交于 2019-12-13 11:35:02
问题 I have a VPS and I want to make mysql DB accept connection externally (from my PC for instance). I have Debian Linux installed on the server. I checked some tutorials online and they said to comment out: bind-address = 127.0.0.1 But this didn't seem to help! is there anything specific for VPSs? or Am I missing something else? The command that runs mysql is: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking -

PHP mySQL, Joining More than Two Tables Together with Similar IDs?

我们两清 提交于 2019-12-13 06:59:14
问题 Here is what I am working with: $query = "SELECT Products.Title, Product_Lines.pl_Title, Manufacturers.man_Title". "FROM Products, Product_Lines, Manufacturers ". "WHERE Products.pl_ID = Product_Lines.pl_ID AND Product_Lines.man_ID = Manufacturers.man_ID"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo $row['Title']. " - ". $row['pl_Title']. " - ". $row['man_Title']; echo "<br />"; } I am getting this error: You have an error in your SQL

MySql: Hide certain tables from certain users

允我心安 提交于 2019-12-11 07:56:30
问题 I want to hide certain tables (some definition tables) in the database from certain users. There is this mysql.tables_priv table which is empty. Should I insert something in that table to make it happen and what should be the value of 'table_priv' column? 回答1: You should be looking into the SQL GRANT command. With GRANT, you can assign privileges to users like this: GRANT SELECT ON table TO user; 回答2: If the tables_priv is empty, i believe it means no privileges has been granted for that

MySQL problem - COMPLETE server overrun! Please advise

本小妞迷上赌 提交于 2019-12-11 04:13:19
问题 This is my first question here so please don't be tough on me... :P I usually tend to google my way to a solution but now I'm in a hurry and have used up all the resources I had... because my website is a commercial one, it would be fair to go ahead and pay someone to help me but... I have some financial problems myself, this was the 3rd month of payment to my dedicated server, still it was only the first month since my site was actually up... I have made it all by myself because I cannot

mysql software: any suggestions to oversee my mysql replication server?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 00:39:03
问题 I've had a tough time setting up my replication server. Is there any program (OS X, Win, Linux or php no problem) that lets me monitor and resolve replication issues? (btw, for those -uhm- following, ive been on this issue here, here, here and here. Either i'm going about this the wrong way or i must be immensely thick) My production database is several megs in size and growing. Every time the database replication stops and the databases inevitably begin to slide out of sync i cringe. My last

Memory usage of storing strings as varchar in MySQL

空扰寡人 提交于 2019-12-10 18:36:12
问题 I've begun to get very interested in the memory usage of MySQL. So I'm looking at this here: http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html I get very excited about the prospect of saving memory by (for example) needing only a signed smallint where I was using an unsigned int in many places. Then I read about varchars... "VARCHAR(M) - Length + 1 bytes if column values require 0 – 255 bytes" What?! Now it appears to me as though storing a single varchar would use up so much

mysql connections. Should I keep it alive or start a new connection before each transaction?

会有一股神秘感。 提交于 2019-12-10 15:13:55
问题 I'm doing my first foray with mysql and I have a doubt about how to handle the connection(s) my applications has. What I am doing now is opening a connection and keeping it alive until I terminate my program. I do a mysql_ping() every now and then and the connection is started with MYSQL_OPT_RECONNECT. The other option (I can think of), would be to start a new connection before doing anything that requires my connection to the database and closing it after I'm done with it. What are the pros

Where can I find the file my.cnf or my.ini file? [closed]

与世无争的帅哥 提交于 2019-12-10 14:42:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . I've read about MySQL replication and i need to change some configuration but I can't find the file my.cnf or my.ini. I don't know which MySQL version I have but I've downloaded it a long time ago, as a .zip. My box runs Windows 7 64. Where can i find this file? Should I create it? Where? Thank you. 回答1: I do

MySQL database structure for a webshop

Deadly 提交于 2019-12-08 03:12:46
问题 I am building an online shop and I have a problem. I will have products which have a direct price (for example HTC Touch 2 Smartphone: $299.00 ), but in the same time I will have products which have prices for combinations based on specifications: In this image you can see the database diagram, which I think would be ok for the multiple-price products: THE MAIN PROBLEM: Since this is a webshop, people will put items in the shopping cart. I think the items inserted into the shopping cart