MYSQL
Moderator: Rathinagiri
Re: MYSQL
It's strange, but, I can connect to the same computer by localhost, but I can't connect vy IP address or real name of computer...
look at the picture:
look at the picture:
Re: MYSQL
Try after adding IP Address / Computer name in Host files
----------
Try to locate any existing hosts file on your computer:
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
(you may need administrator access for Windows NT/2000/XP)
----------
Open your hosts file in Notepad. It should look something like this when you open it:
# Copyright (c) 1998 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
----------
Try to locate any existing hosts file on your computer:
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
(you may need administrator access for Windows NT/2000/XP)
----------
Open your hosts file in Notepad. It should look something like this when you open it:
# Copyright (c) 1998 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: MYSQL
Hi
All I can tell you is my experience of using mySQL on Linux.
You have to tell mySQL host to allow remote access by doing at least all of the following:
1 comment out skip-networking in [[/etc/mysql/my.cnf]]
2 comment out bind address in [[/etc/mysql/my.cnf]]
3 allow remote connection from your lan subnet 192.168.1.0/24:
sudo /sbin/iptables -A INPUT -i eth0 -s 192.168.1.0/24 -p tcp --destination-port 3306 -j ACCEPT
5 In mySQL: grant all privileges on DatabaseName.* to [[LoginName@'192.168.1.74'|LoginName@'192.168.2.3' ]] identified by 'password';
where 1.74 to 2.3 is the possible range.
at least some of that must apply under windows.
All I can tell you is my experience of using mySQL on Linux.
You have to tell mySQL host to allow remote access by doing at least all of the following:
1 comment out skip-networking in [[/etc/mysql/my.cnf]]
2 comment out bind address in [[/etc/mysql/my.cnf]]
3 allow remote connection from your lan subnet 192.168.1.0/24:
sudo /sbin/iptables -A INPUT -i eth0 -s 192.168.1.0/24 -p tcp --destination-port 3306 -j ACCEPT
5 In mySQL: grant all privileges on DatabaseName.* to [[LoginName@'192.168.1.74'|LoginName@'192.168.2.3' ]] identified by 'password';
where 1.74 to 2.3 is the possible range.
at least some of that must apply under windows.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MYSQL
Marek and Richard,
I think I have found out the problem! For your problem the solution is very simple.
MySQL server is set by default not to connect 'root' user from other than localhost! That is for security reasons. But this can be modified also.
Please check with another user.
I think I have found out the problem! For your problem the solution is very simple.
MySQL server is set by default not to connect 'root' user from other than localhost! That is for security reasons. But this can be modified also.
Please check with another user.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MYSQL
Kindly read this:
http://www.howtogeek.com/howto/programm ... -any-host/
You can create any number of user accounts in MySQL server for remote access, since root access from remote host is not secure.
http://www.howtogeek.com/howto/programm ... -any-host/
You can create any number of user accounts in MySQL server for remote access, since root access from remote host is not secure.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: MYSQL
Thank you very much - you are the best
I even reinstalled my windows firewall - and it works OK.
2 more things:
1. This is my first contact with MySQL ( I already used SQLite, but not with HMG).
I still would prefer a server/client solution using native XBASE commands like Letodb.
But still waiting a solution to link the library (see topic LETODB).
Maybe in the long run MySQL is better?
2. Is there an 'easy way' to convert XBASE-like programs to MySQL syntax (functions...)?
Thanks again
Richard
I even reinstalled my windows firewall - and it works OK.
2 more things:
1. This is my first contact with MySQL ( I already used SQLite, but not with HMG).
I still would prefer a server/client solution using native XBASE commands like Letodb.
But still waiting a solution to link the library (see topic LETODB).
Maybe in the long run MySQL is better?
2. Is there an 'easy way' to convert XBASE-like programs to MySQL syntax (functions...)?
Thanks again
Richard
Re: MYSQL
You are great Rathi!
That was really problem with root user!
I've read about it few years ago, but I've missed it...
Many thanks!
That was really problem with root user!
I've read about it few years ago, but I've missed it...
Many thanks!
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MYSQL
In SQL arena, for single user system SQLite is the best and for multi-user system we have many products like MySQL, MariaDB, PostgreSQL, FireBird etc.,t57042 wrote:Thank you very much - you are the best
I even reinstalled my windows firewall - and it works OK.
2 more things:
1. This is my first contact with MySQL ( I already used SQLite, but not with HMG).
I still would prefer a server/client solution using native XBASE commands like Letodb.
But still waiting a solution to link the library (see topic LETODB).
Maybe in the long run MySQL is better?
2. Is there an 'easy way' to convert XBASE-like programs to MySQL syntax (functions...)?
Thanks again
Richard
I am using SQLite and MySQL extensively and exclusively in almost all my new projects. Some old projects are still running in dbf too.
IMHO it is not that hard to converge from dbf to sql.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: MYSQL
Maybe it's not good place, but I want to point onee problem with sqlite.
function SQL was defined with these statements:
When I declared one column as INTEGER(3)
SQL function converted numeric data to strings!!!
I was looking for problem, and solution appears so simple:
problem with ==
Regards, Marek
function SQL was defined with these statements:
Code: Select all
stmt := sqlite3_prepare(dbo1,qstr)
IF ! Empty( stmt )
for i := 1 to sqlite3_column_count( stmt )
type1 := upper(alltrim(sqlite3_column_decltype( stmt,i)))
do case
case type1 == "INTEGER" .or. type1 == "REAL" .or. type1 == "FLOAT" .or. type1 == "DOUBLE"
aadd(typesarr,"N")
case type1 == "DATE" .or. type1 == "DATETIME"
aadd(typesarr,"D")
case type1 == "BOOL"
aadd(typesarr,"L")
otherwise
aadd(typesarr,"C")
endcase
next i
endif
SQLITE3_FINALIZE( stmt )
SQL function converted numeric data to strings!!!
I was looking for problem, and solution appears so simple:
Code: Select all
do case
case type1 = "INTEGER" .or. type1 = "REAL" .or. type1 = "FLOAT" .or. type1 = "DOUBLE"
aadd(typesarr,"N")
Regards, Marek