MySQL Tips and Tricks Which You Should Know !
Windows Server 2008 R2 also has the built-in option of creating multiple database users (dbuser/dbpassword) using the UNIQUE keyword (ensure you have some at least). But only a few databases which use MySQL up to version 5.1 support UNIQUE: MySQL Server, MariaDB, MYSQLite, CRMQLite and ORACLE (well, at least by default). And I’m assuming the reason is their respective clients were just designed for UNIQUE rather than logical select from a particular table. So for MySQL servers I still recommend only UNIQUE as a back-up.
Update #4: Added info about MySQL admin log-in mechanism and MySQL log-out.
Installing SQL Server on Windows Server 2008 R2 is super easy. All you have to do is download an ISO. Plug in the USB boot disk and start the installation wizard. Give the installation wizard your current user ID and the MySQL server password. The new server will automatically start using your existing MySQL database user for this process. After the installation finishes, reboot your system and give the new MySQL server its very own user ID (just in case you don’t want to restart your existing MySQL server). For information about an upgraded database user registration mechanism, see this page.
With the database already installed (or connected) start installing MySQL client and database extensions (or extension modules for SQL Server). You will need to select a database connection type in the setup menu (create or create connection). At this point you need to choose a database location to store MySQL client connections and database data (just by default MySQL client connects to mySQL server which is located in C:\windows\system32).
You need to create database users. Start with the new MySQL database. Then start the following command: “createuser -dbusername -dbpassword -accountname administrator”. Fill in the relevant information (the password and account name). This creates an admin user for MySQL which can be used to log-in (during the login process) to MySQL server and database (you must finish the setup process for MySQL server and you must either delete the user if you do not wish to login). In case you run into a trouble you can also delete this database user if you need it.
Now to connect to the new MySQL server (first I’m setting up port 80):
mysql -dbuser -dbpassword -accountname administrator -port = 80 -bind_address = http://localhost/mysql-master -connect = mysql://localhost/mysql-server
At this point in the setup procedure you have to connect to the SQL Server using the standard client configuration (see the database settings at the beginning of this article). After connecting you will need to give it the database users you set before. In case you need to change your MySQL database user to the new one, just update the user database information from the server settings in the SQL Server Administration Tools.
You need to provide a database server name (basically the database server name you specified earlier for the database users). The database server name is also the default admin user name if you do not set another (right from the client application).
Finally you can log-out from the SQL Server administration tools to give the server its own login system (logging into the server without a password is not recommended). Before logging-out you have to set the password for the database admin account. If you have not yet entered a password then log-in will try a sequence of login passwords (one per login, just in case). You can also log-out in case you have no intention of logging-in to the server.
By default the database connection is through a virtual database connection, but this is not recommended in general. In case you do not want to create a virtual connection then configure the connection using a standard MySQL server connection by entering: “connect -target mysql://SERVER_PORT/dbname -dbuser -dbpassword -accountname admin”. The name of the database server is “database_server”. Note: In case you are not sure which database server you want to use (you can only specify up to three database servers for the entire SQL Server database setup), just check the database server name as a valid option
Tags :- #tips and tricks,tips,ssms tips,javatips,tuning tips,iops,hipaa,azure tips and tricks,devops,azure tips and tricks series,tips for database development,database backups,top sql questions,app service migration,mysqli prepared statements procedural,databases,mysql,engineer man,mysql tutorial,learn mysql,mysql course,learn sql,sql basics,sql for beginners,sql,sql tutorial,sql course,sql crash course,structured query language,sql beginners,mysql crash course,mysql tutorial for beginners