Closed dif1754 closed 9 years ago
Hello dif1754,
Could you execute the following query in phpmyadmin:
SELECT * FROM mysql.user;
Are the columns that end with _priv
set to Y
in the row where Host is 127.0.0.1
and user is root
?
Andreas
Hi Andrea, the answer is yes,
see also the screenshot:
Hello dif1754,
the screenshot seems to be OK.
Could you execute the following queries in phpmyadmin:
show grants for current_user
show grants for 'root'@'127.0.0.1'
Can you check, if the original LWT version works, just to make sure there isn't a bug in my code? You can download it from http://sourceforge.net/projects/lwt/files/
Andreas
1) I created an "lwt" directory with the original (old) project, customized connect.inc.php file and then program works (database named "learning-with-texts").
2) Then I created a new "lwt-beta" directory with your improved version, customized the connect.inc.php file with a new database name "learning-with-texts-beta", I created a database on mysql with that name and what I get is an error:
Fatal Error: DB select error (Cannot find database: "learning-with-texts-beta" or connection parameter $dbname is wrong; please correct file: "connect.inc.php"). Please read the documentation: http://lwt.sf.net
Backtrace:
So it must be something in your program, apparently.
I also run the suggested sql commands. Here are the results:
show grants for current_user;
Host: mysql wampserver Database: Generation Time: Ago 12, 2015 alle 18:18 Generated by: phpMyAdmin 4.1.14 / MySQL 5.6.17 Query SQL: show grants for current_user; Righe: 2
Grants for root@localhost GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' ... GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GR...
show grants for 'root'@'127.0.0.1';
Host: mysql wampserver Database: Generation Time: Ago 12, 2015 alle 18:19 Generated by: phpMyAdmin 4.1.14 / MySQL 5.6.17 Query SQL: show grants for 'root'@'127.0.0.1'; Righe: 1
Grants for root@127.0.0.1 GRANT ALL PRIVILEGES ON . TO 'root'@'127.0.0.1' ...
Thanks
Hello dif1754,
can you change the lines 4058 and 4061 in C:\wamp\www\lwt-beta\utilities.inc.php
from
$err = @((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE " . $dbname));
to
$err = mysqli_select_db ($GLOBALS["___mysqli_ston"], $dbname);
and try if it works now
Andreas
Hi Andreas,
I made the changes: now it's working as usual.
Thanks, Cristian
Hi!
I upgraded Win 7 to Win 10 and made a clean installation of LWT (in the past I already did several installations).
I installed WAMP package (it happens with XAMPP too) and then copied the lwt app inside theC:\wamp\www dir.
I can use phpMyadmin to manage the mySQL databases, I see all databases.
The contents of the "connect.inc.php" file inside lwt dir: $server = "127.0.0.1"; $userid = "root"; $passwd = ""; $dbname = "learning-with-texts";
What I get from lwt app:
the mySql has no database "learning-with-texts" and running 127.0.0.1/lwt I get the error message_ Fatal Error: DB select error (Cannot find database: "learning-with-texts" or connection parameter $dbname is wrong; please correct file: "connect.inc.php"). Please read the documentation: http://lwt.sf.net
I also tried to create (with mySQLadmin) a db named "learning-with-texts", empty, but I still get the same error from lwt....
The mysql port is open:
Any clues?
Thanks
PS I stopped the antivirus program: same behaviour.