Konsole encoding

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Konsole encoding

Postby men » 17. August 2023 13:25

Hello,

I am new here. I havent found anything to my problem in this topic yet and am hoping somebody could help me to find the solution/topic at least ...
I installed xampp on a win10 computer ... after everything was configured to my needs (httpd.conf, my.ini, etc.) I used the "Console"-Button on the xampp-controlpanel (the xampp-console) to connect to the MySQL server and set up the root password ...
In a second step I tried to log on via the phpMyAdmin interface with the just set password which did not work; then I tried to connect via Oracle Workbench to the xampp configured and managed Server ... same result; I also tried to use mysqlsh.exe of a mysql server standalone installation on the same computer and tried to log in ... same result. All connection attempts are made over the loopback interface; therefore conection issues may not be the problem.
After some research I came to the possible result, that the encoding of the xampp-console is something different as UTF-8, and therefore the Passwords do not match.

My question now is how to change the encoding to that xampp-console during runtime (which AFAIK is not possible) to log in with the wrong encoding, and change the password with the correct encoding.
Or is there maybe a other way to change the passowrd to be able to log on as root.
Also good to know how to configure the xampp-console to a suitable encoding; ideally automatically to the encodings of the runing servers.

Thanks for your help.
men
 
Posts: 5
Joined: 17. August 2023 13:02
Location: Land Salzburg
XAMPP version: 3.3.0.0
Operating System: Windows 10

Re: Konsole encoding

Postby Nobbie » 17. August 2023 21:50

men wrote:Or is there maybe a other way to change the passowrd to be able to log on as root.


Of course, you are in the completely wrong context.

When you changed the root password and want to run phpmyadmin, you have to edit config.inc.php in the phpmyadmin folder and have to apply the newly created root password at the appropriate option (you will see that in config.inc.php, there is a setup of server variables and one is called "password"), where the "user" value is set to "root". i.e, the line looks like:

Code: Select all
$cfg['Servers'][$i]['password'] = '';


FInally, its never wrong to read the documentation about the tools, which you are using.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Konsole encoding

Postby men » 18. August 2023 09:05

Tnank you for your answer.

I know about this config; and yes I adapted it too with the others httpd.conf, my.ini, etc. Especcially, in the case of config.inc.php, I set the auth_type to coockie, and AllowNoPassword to false. And AFAIK in this case setting a root password to the password variable should not be neccesarry. But please tell me if I am wrong.

Never the less, not being able to log on via phpMyAdmin is just a side information. My main intent is to log on via consoles - the mysqlsh of oracle made for mysql, and PowerShell just to be shure - and also to be able to use Oracles MySQL-Workbench, which should not be affected by this config-file at all. Thoug, I slightly can remember that there some years ago, had been stated an issue, beeing intendingly unable to log on via Workbench on xampp's version of mysql, but I am not sure.
As I oversaw the encoding of xampp's console being different, I am now stuck with other consoles and the server itselve being encoded differently. Yes, I could set the other consoles to the encoding of xampp's console. Though, it has reason to use utf8.
I yet have not found any way to set or reset the xampp's consoles - or any other consoles - encoding during the logon to the mysql server. If this would be possible it would be great. If this would not be possible, all good, I already know how to bypass the password etc. Though, my main question is, how to configure the encoding of xampp's console to be the one I want. (Which file, which setting, etc.) I have nothing found abaout that yet.

I hope I was able to outline my problem a bit better.
------------------------------------------------------------------------------
Mehr Wissen, mehr Verantwortung, mehr Arbeit, mehr Wissen, ...
men
 
Posts: 5
Joined: 17. August 2023 13:02
Location: Land Salzburg
XAMPP version: 3.3.0.0
Operating System: Windows 10

Re: Konsole encoding

Postby Nobbie » 18. August 2023 11:29

I neither know mysqlsh nor PowerShell, but keep in mind, that these are made for MySQL (which is overtaken from Oracle), but Xampp does not deliver MySQL, it delivers MariaDB. Even if they are compatible in most contexts, these are not compatible when connecting to drivers. I am not sure if you can run mysqlsh and PowerShell with MariaDB. If i were you, i would not use Xampp with MariaDB, but instead plain MySQL from Oracle, just to be sure that its running together.

Finally, i dont understand what you mean by Xampp "console"? Do you mean the SQL command interpreter "mysql"? I dont use Windows and dont know the GUIs from the Windows installation, but i think, its the SQL Interpreter which is starting up. You can start that also in a command prompt and apply connection credentials by yourself.

P.S.: Here is a full documentation about "mysql" SQL Interpreter including all parameters. There is also an option --default-char-set to set the character set of the connection. Read carefully.

P.P.S.: "Language german only!" - did you see that in the Topic of this board?
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Konsole encoding

Postby Clarar » 20. August 2023 07:33

Hello guys
"Konsole encoding" likely refers to character encoding settings in a terminal emulator. Ensuring correct encoding is crucial for displaying and processing text accurately. Proper configuration avoids display issues.
Clarar
 
Posts: 3
Joined: 15. August 2023 06:48
XAMPP version: 8.0.10
Operating System: Windows

Re: Konsole encoding

Postby men » 22. August 2023 12:57

Nobbie wrote:"Language german only!" - did you see that in the Topic of this board?

Nein, hab ich nicht gesehen. :oops:

Nobbie wrote:i dont understand what you mean by Xampp "console"?

Sorry, ich hab "Shell" gemeint; Der "Shell" Knopf auf dem Windos XAMPP Control Panel. Daher, Nein ich habe nicht den cleint mysql.exe gemaint. Dieser - weil er ein Kommandozeilen-Prog. ist - könnte schließlich auch von der guten alten cmd.exe aus ausgeführt werden. Oder - wie du angedeutet hast - von sh, bash, etc. aus afu linux systemen.

Nobbie wrote:.. but Xampp does not deliver MySQL, it delivers MariaDB. Even if they are compatible in most contexts, these are not compatible when connecting to drivers ...

Treiber ... Ich wünschte ich wäre bereits so weit. Derzeit ist es mir möglich mich mit dem Server zu verbinden ... Allerdings ist der Login das Problem. Via phpMyAdmin (verwendet MariaDB) (mit dem cookie setting in config.inc.php) mit einem Passwort aus XAMPP-Shell/Console heraus gesetzt, wird der Login mit dem Fehler-Code für falsches Passwort quittiert -> Was in meiner Erfahrung nach meist mit einem falschen encoding/codepage zu tun hat, oder ein Sicherheits-Einstellungs-Problem ist. Letzteres konnte ich durch ausschalten dieser Eintsellungen ausschließen. Weiters verbinde ich mich auf localhost; also eigentlich diesbezüglich eh keine Hexerei.
BTW wenn mysqlsh.exe nicht fähig wäre, sich zum server zu verbinden, würde es sich einfach beenden.
Außerdem wundert mich, dass MariaDB und ein client für MySQL nicht miteinander kompatibel sein sollten. MariaDB ist unter anderen mit der Absicht entwickelt worden schnell, einfach und unkompliziert wechseln zu können. Dass einige Spezifika nicht funktionieren ist klar; aber so weit komme ich ja gar noch nicht. :|

Clarar wrote:"Konsole encoding" likely refers to character encoding settings in a terminal emulator.

Ja, um genau zu sein die Codepage. Allerdings ist nicht das Zeigen der Zeichen das Problem, sondern das Verarbeiten.

Meine Haupt-Frage ist immer noch: Wo finde ich die Konfiguratinos-Dateien für die XAMPP-Shell und was muss ich setzten, dass der richtige Zeichensatz verwendet wird.

Dank, euch für die Geduld, und Bemühungen.
------------------------------------------------------------------------------
Mehr Wissen, mehr Verantwortung, mehr Arbeit, mehr Wissen, ...
men
 
Posts: 5
Joined: 17. August 2023 13:02
Location: Land Salzburg
XAMPP version: 3.3.0.0
Operating System: Windows 10

Re: Konsole encoding

Postby Nobbie » 22. August 2023 19:28

Ein paar Anmerkungen dazu:

1) die Xampp Shell für MySQL ist selbstverständlich der Interpreter mysql.exe

2) das Passwort in der Konsole zu setzen ist sehr gewagt, denn MySQL / MariaDB speichert das Passwort nicht in Plain Text ab, sondern mit einer Cryptifiizerung. Ich weiß nicht auswändig, welche Funktion benutzt wird, ich glaube aber, die PASSWORD Funktion. Wenn man das nicht richtig macht, kann man sich gar nicht mehr einloggen. Ich kann nur dringendst empfehlen, das Passwort nicht via Konsole, sondern via phpmyadmin zu setzen, da wird es automatisch richtig gesetzt. Und ich kann auch nicht empfehlen, Umlaute o.ä. im Passwort aufzunehmen.

3) Anstelle die Xampp Shell (= mysql.exe) zu benutzen, starte mysql.exe selbst in einer Konsole. Da kannst Du den Zeichensatz für die Verbindung setzen, aber der Zeichensatz für die Konsole an sich wird von Windows vorgegeben (ich kenne es aber nicht).
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Konsole encoding

Postby men » 24. August 2023 11:42

An alle, danke für den Beistand, Ich habs jetzt mal für mich gelöst indem ich die BATCH-Datei, welche die Shell startet so angepasst habe, dass die richtige Codierung eingestellt wird (mittels chcp). Jetzt kann ich mit allen clientseitigen Anwendungen, welche ein Admin nutzen könnte - darauf zugreifen und kann auch einloggen.

Man sollte also immer bevor man ein passwort auf einem (entfernten) server ändert auch darauf achten, welche Zeichencodierung dieser verwendet und diese mittels am client einstellen. In meinem Fall mit der Shell bzw. cmd.exe unter Windows wäre dies CHCP <CODEPAGE NUMBER> gewesen also zB.:
Code: Select all
> CHCP
Aktive Codepage: 1250

> CHCP 65001
Aktive Codepage: 65001

um zuerst den aktuell eingestellten wert zu sehen und um zu UTF-8 ein zu stellen; 850 wäre ASCII-Westeuropäisch und 1250 Windows Westeuropäisch, etc.
(Ich habe gerade gesehen, die Datenbank test am MariaDB-Server ist auf utf8-swedish eingestellt - ich freu mich schon ;))

BTW Mich wundert eh noch immer, dass xampp bzw. wampp immer noch auf die verwendung der PowerShell verzichtet.

zu 2) Ja, ich hätte gleich dran denken sollen, die richtige chcp ein zu stellen. phpMyAdmin ist sicherlich die einfachtse und bequemste Lösung.

Dank euch allen.
------------------------------------------------------------------------------
Mehr Wissen, mehr Verantwortung, mehr Arbeit, mehr Wissen, ...
men
 
Posts: 5
Joined: 17. August 2023 13:02
Location: Land Salzburg
XAMPP version: 3.3.0.0
Operating System: Windows 10

Re: Konsole encoding

Postby Nobbie » 25. August 2023 09:01

Wozu Powershell? Xampp ist eine Webserversoftware, die normalerweise auf einem remote Server installiert wird. Da gibt es kein Powershell. Du willst ja "lernen" (das ist der Sinn von Xampp), wie man Server konfiguriert und Webseiten entwickelt. Powershell gibt es nicht auf remote Servern. Die laufen sowieso fast alle unter Linux.

Deswegen ist ja u.a. auch PhpMyAdmin mit im Paket, weil das das typische Frontend für administrative Aufgaben an der Datenbank ist, das läuft ganz normal auf jedem Webserver. Powershell läuft nur lokal auf Deinem Rechner und hilft da bei gar nichts. Remote hast Du allenfalls noch ssh o.ä. als Konsole zur Verfügung.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Konsole encoding

Postby men » 04. September 2023 11:09

Hast recht, wer lernen will, soll auch neues ausprobieren. PowerShell ist für mich aber genau dieses Neue. Angefangen die basics zu erlernen hatte ich auf linux Rechnern. Was aber die Verwendung von Anwendugnen auf verschiedenen Betriebssystemen angeht, habe ich bisher andere Erfahrungen gemacht.

phpMyAdmin ist wirklich toll umgesetzt - man kann auch einiges damit machen - und als (blutiger) Anfänger ist es sicher das richtige Tool los zu lengen, sich um zu sehen, was alles möglich ist und welches nicht machbar ist, die ersten Fehler zu machen, und machbare workarounds dafür zu entwickeln.

Ich habe meine Lektion auf jeden Fall gelern künftig auf windows Rechnern auf die Zeichencodierung der jeweiligen Shell/Konsole zu achten, bevor ich ein Passwort setzte.
------------------------------------------------------------------------------
Mehr Wissen, mehr Verantwortung, mehr Arbeit, mehr Wissen, ...
men
 
Posts: 5
Joined: 17. August 2023 13:02
Location: Land Salzburg
XAMPP version: 3.3.0.0
Operating System: Windows 10


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 98 guests