How to connect to mySQL- caching_sha2_password ?
Serge
sha2_password
Moderator: Rathinagiri
- serge_girard
- Posts: 3234
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
sha2_password
There's nothing you can do that can't be done...
Re: sha2_password
I am not sure what you are looking for.
I have found when using Microsoft Edge, after going in, in the top right corner is a red and green flag.
If you click it a copilot box will be a bottom of screen.
You can ask in that box any question about anything including programing questions.
Like
How to create a menu in c# language.
How to create a menu in hmg language.
How to connect to mySQL- caching_sha2_password ? in hmg language.
Most answers you get are quite accurate.
I have found when using Microsoft Edge, after going in, in the top right corner is a red and green flag.
If you click it a copilot box will be a bottom of screen.
You can ask in that box any question about anything including programing questions.
Like
How to create a menu in c# language.
How to create a menu in hmg language.
How to connect to mySQL- caching_sha2_password ? in hmg language.
Most answers you get are quite accurate.
All The Best,
Franco
Canada
Franco
Canada
- serge_girard
- Posts: 3234
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: sha2_password
Thanks Franco,
I wil try with CHATgpt
Serge
I wil try with CHATgpt
Serge
There's nothing you can do that can't be done...
Re: sha2_password
You can ask it in language you like.
It will create code for you in any language.
Ask it .... create menu in hmg language or ..... create menu in gui language.
It will create the code for you which you can compile with a build.bat
It will give you an explanation plus the code. You do not need CHATgpt I don`t think.
if you ask it
connect to mySQL- caching_sha2_password ? in hmg language.
CREATE USER 'yourusername'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpassword';
GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost';
FLUSH PRIVILEGES;
It will create code for you in any language.
Ask it .... create menu in hmg language or ..... create menu in gui language.
It will create the code for you which you can compile with a build.bat
It will give you an explanation plus the code. You do not need CHATgpt I don`t think.
if you ask it
connect to mySQL- caching_sha2_password ? in hmg language.
CREATE USER 'yourusername'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpassword';
GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost';
FLUSH PRIVILEGES;
All The Best,
Franco
Canada
Franco
Canada
- serge_girard
- Posts: 3234
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: sha2_password
From chatgpt:
Can't find hb_MySQL* function at the moment, tomorrow perhaps...
S
Code: Select all
#include "hmg.ch"
REQUEST HB_MYSQL
FUNCTION Main()
LOCAL oMySql, cHost, cUser, cPassword, cDatabase, nPort
cHost := "127.0.0.1" // MySQL server host
cUser := "your_username" // MySQL username
cPassword := "your_password" // MySQL password
cDatabase := "your_database" // MySQL database name
nPort := 3306 // MySQL server port
oMySql := hb_MySQLInit()
IF oMySql == NIL
MsgInfo("Failed to initialize MySQL client")
RETURN NIL
ENDIF
IF hb_MySQLConnect(oMySql, cHost, cUser, cPassword, cDatabase, nPort)
MsgInfo("Connection successful!")
// Perform database operations here
hb_MySQLClose(oMySql)
ELSE
MsgInfo("Failed to connect: " + hb_MySQLError(oMySql))
ENDIF
RETURN NIL
S
There's nothing you can do that can't be done...