MySQL Connection Over LAN.
I have installed mySQL server on a computer (ServerName: AHMED, ip:192.162.0.1) and teh server listens at port:3306.
I type "mysql -u root -p" on command line to connect to the server on local host.
Now I want to connect to the same server over the network from a computer (ComputerName: FARAZ, ip: 192.168.0.2). I Copied mysql.exe to the client PC (FARAZ) and I typed the line "mysql AHMED -u root -p" on FARAZ (Client PC) but It says that it fails to find any mySQL sever on AHMED.
1] If I only have to copy mysql.exe on the client to access mySQL server over a network.
2] Am I right to type "mysql AHMED -u root -p" on the client to connect to the mySQL server?
View 1 Replies (Posted: November 16, 2004 06:12AM)
Sponsored Links:
Related Forum Messages for MySQL:
Php - Make A Temporary DB Connection Without Losing The Original Default Connection
I have a very large and unstructured script. At some point in the script, a DB connection is made. Some time after that point I need to make a new connection to another DB, run a query then disconnect. After I've done this, I need all subsequent mysql_query() calls to use the original DB link. I know I can capture the link identifier from the first mysql_connect(), and use that in all relevant mysql_query() calls, but I don't want to modify any more code than I have to. I'm looking to do something like this: //... loads of code ... mysql_connect("original connection"); mysql_query(...); // don't want to modify these lines //... loads more code ... $link = get_current_mysql_link_identifier(); // imaginary function $new_link = mysql_connect("my new connection"); mysql_query(...); // uses new connection mysql_close($new_link); reinstate_old_link($link); // imaginary function //... loads more code ... mysql_query(...) // line remains unchanged. uses original DB link Without those imaginary function, once the second connection is closed, mysql_query() does not default to the original connection; it continues to try and use the more recent, closed connection.
Posted: Apr 13 at 16:47
View 1 Replies!
View Related
.net - Connector / NET Connection Multiple DataReaders Per Connection?
I'm migrating from Java to C# now that I've realized I prefer the C# language features over the ones in Java, but I have this small issue. In MySQL Connector/J and JDBC, I believe that one of my applications allowed multiple PreparedStatements to be executed while another one is open, like I could perform a query that returns a ResultSet and while that ResultSet is still open, I could open another PreparedStatement and get another ResultSet or I could just execute an update, based on the data I got from my first ResultSet (i.e., insert a salt value and update the password column with a SHA512 hash when I realize that the row has a plaintext password in the password column). However, with Connector/NET, I've come to realize whenever I try doing this, I get this error: MySql.Data.MySqlClient.MySqlException: There is already an open DataReader associated with this Connection which must be closed first. Is there a easy way to fix this error, maybe any other implementations of a MySQL to .NET bridge? I don't really want to create a lot of DB connections in one application, although I might want to create one for every thread in my application (as in a ThreadLocal). A ThreadLocal DB connection will help when I perform two queries at the same time in two different methods, but obviously I cannot separate these two commands into different threads and I don't want to create excess threads. By the way, here's the code itself. Yes, I can move the update code down to after I close the reader, but I have many more similar methods and some of them are more difficult to fix up than this one: MySqlConnection con = DatabaseConnection.GetConnection(); MySqlCommand cmd = con.CreateCommand(); cmd.CommandText = "SELECT `id`,`password`,`salt`,`pin`,`gender`,`birthday` FROM `accounts` WHERE `name` = '" + AccountName + "'"; MySqlDataReader reader = cmd.ExecuteReader(); if (reader.Read()) {...........................
Posted: Sep 10 10 at 14:18
View 3 Replies!
View Related
Inserting Into A Db Using 1 Connection (C#.NET) - Connection Must Be Valid And Open
i'm having an issue using C# inserting multiple rows into a MySQL database, have the following code; //Upload to mysql string connStr = "server=server;user=username;database=databasae;port=3306;password=password;"; MySqlConnection conn = new MySqlConnection(connStr); conn.Open(); foreach (Channel chan in results) { // Perform databse operations try....... I seem to be getting "connection must be valid and open". From what i can see i'm passing the connection string correctly and i'm using ExecuteNonQuery.
Posted: May 9 at 9:12
View 4 Replies!
View Related
Changes Made In One Connection Does Not Reveal In Another Connection At Once.
I use many connection and the same as many threads in my server app to gain performance on a multicpu machine. Firstlly i call "set autocommit=0" and wrap every statements with "start transaction " and "commit". i use mysql_stmt_execute for every statement rather than mysql_real_execute except those that can't be prepared. The version of mysql is 4.1.11 under Debian linux. In one connection of one THREAD i insert a row into a table. After i got the sucess code and the last insert id, i then do a "select" from another connection in another THREAD with the "last insert id" return by the previous insert . I expect the select can fetch the row that i have just insert , but some time it does and some time it doesn't. is there any funtion like "mysql_....flush...cache.." to make the changes from one connection to be reveal to the global at once?
Posted: April 11, 2005 08:07PM
View 1 Replies!
View Related
Connection Through PHP
My setup is windows xp , apache 2 , php 4.3.10 , mysql 4.1.8 ... Php and apache work fine , and i can control mysql via command line . But ...When i try to control mysql via php with the follow script : <?php $connection = mysql_connect ( "localhost", "root", "") or die ( "unable to connect to MySQL" ); echo( "connected to MySQL" ); ?> I take the next message : Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:Program FilesApache GroupApache2htdocsSitesTestain.php on line 9 unable to connect to MySQL
Posted: January 6th, 2005, 05:54 AM
View 2 Replies!
View Related
Connection To Db With C#?
I am trying to connect mysql to windows following the instructions given in [URL] I have installed mysql 5.1 software,gui tools and mysql connector. Mysql is working fine. I want to establish connection b/w mysql database & c# windows application. But I am not able to find "MySql.Data" in add references tab in c# windows application.
Posted: Jul 30 09 at 11:34
View 2 Replies!
View Related
DB Connection With MAC?
When i try to connect to my MYSQL-DB from a Windows-PC everything works, but when i try it from a Mac (I tried it with 2 macs) i get the errormessage "Can't get hostname". I'm using MySQL-Workbench 5.2.31. The DB is running on Windows Server 2008 R2. EDIT: More Info: The MYSQL Server is running on a Windows Server 2008 R2 machine.The Server works, because i can connect from a Windows-PC. (The Windows-PC is not the Server)The Port for the MYSQL Server (3306) is definitely open!The Hostname is the DNS-address of the server!
Posted: Feb 28 at 11:05
View 2 Replies!
View Related
Connection Life
If I establish a connection, how long will that connection live without being used? Is there a parameter somewhere in MySQL that determines this?
Posted: May 10th, 2007 12:15 PM
View 5 Replies!
View Related
Connection To MySQL Using .net
I am trying to connect to a MySQL database, using the .Net framework. I installed the newest MyODCB (3.51) and the .Net ODBC drivers from Microsoft. I made a System DSN using the driver, and i get it to connect - so far so good. But if i try making a new connection i my code using the sample connectionstring from MySQL, i get an Exception :( "An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'." What i try is: Return New OleDb.OleDbCommand("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=bigshop;UID=root ;PASSWORD=;OPTION=3;")
Posted: July 19th, 2005 11:14 PM
View 2 Replies!
View Related
Remote SQL Connection
I am trying to access my database on the server with a MYSQL front-end client on my computer (not the server). I have the correct username, password and database name. I tried every possible hostname, even its ip addy, but each time, I am rejected by the server, which says something like - access denied. I can access the database in my php code with 'localhost', but that's of course because the code is actually running on the server. Is there anything I have to specify on the MYSQL server in order to gain access to it remotely?
Posted: July 19th, 2005 11:31 PM
View 2 Replies!
View Related
Connection / Permission
I have the following sitution... MySQL version 3.23.47 PHP version 4.3.2 Redhat Linux version 7.1 Apache version 1.3.29 I have a MySQL user called 'user' that is set up with full rights for localhost, 127.0.0.1, and the external IP address. I can connect to the database using all three users from the command line... ../mysql --user=user --password=password --host=###.###.##.### ../mysql --user=user --password=password --host=127.0.0.1 ../mysql --user=user --password=password --host=localhost But in my php script running on the server, I can only connect using the hostname localhost... $DBConnection = mysql_connect("localhost","user","password"); the IP addresses don't work... $DBConnection = mysql_connect("###.###.##.###","user","password"); $DBConnection = mysql_connect("127.0.0.1","user","password"); these give me the following error: Warning: mysql_connect(): Can't connect to MySQL server on 'domain.com' (111) Is there anyone that's seen this and can point me in the right direction?
Posted: July 20th, 2005 12:23 AM
View 1 Replies!
View Related
LOSING CONNECTION
If I do a the following using mysql_query SELECT * FROM cine_ticket_transaction WHERE performance_day='2004-10-28' AND film_name='Les miserable' If the record does not exist, I lose the connection with the mysql server.
Posted: July 20th, 2005 12:35 AM
View 2 Replies!
View Related
Connection Errors
i was trying to get on a website and this is what came up..... warning: msql_connectO#HYoooHost'bluefin' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /siv/www/website/online/online.hyml on line 8 connection
Posted: October 21st, 2005, 11:57 AM
View 1 Replies!
View Related
Dreamweaver Connection
i try to connect mysql in dreamweaver. But I got a error saying that "a unidentifed error occured"what will mostly cause of the problem? how do I fix it?i am using localhost as my mysql server.it works well with sqlyog and DBdesigner with current setup. I can write php with dreamweaver using current setup too.
Posted: January 9th, 2005, 03:56 AM
View 3 Replies!
View Related
External Connection
I wanted to know if something would be possible. I currently have a server that runs mySQL and i created a database on there for use with PHP-Nuke Treasury module. I don't know much in the way of MySQL besides the basics. I uploaded the .sql file to the database without any problems.Is there then a way i can connect to this database (say is on oldsite.net) from my other web server (say, newsite.net which is currently without MySQl for a while)?Lets say the database is called "myDatabase" with user "database" with password "password" given full access privileges. How could i then connect to this database using a script on my newsite.net server?
Posted: February 2nd, 2008, 05:29 PM
View 3 Replies!
View Related
Many Connection Errors
I'm currently running a website on a hosted linux plateform. But I get the following message 1 out of 10 pages... The less loaded is the site and the less often it happens. Does anyone have an idea of the problem ? Warning: mysql_connect(): Host '172.16.100.6' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' in /mnt/storage-emc1/b/br/brown-sales-lettings.com/html/menu/config.php on line 13
Posted: February 7th, 2006, 05:19 PM
View 2 Replies!
View Related
|