INSTALASI MYSQL-5.7 LINUX
Teknologi / 6 Juli 2018

A. Proses Instalasi $ sudo apt install mysql-server mysql-client mysql-common B. Proses Konfigurasi Kalau kita langsung mencoba login menggunakan root akan gagal dengan error kurang lebih sebagai berikut juwarto@DJOE:~$ mysql -u root ERROR 1698 (28000): Access denied for user ‘root’@’localhost’ juwarto@DJOE:~$ mysql -u root -p Enter password: ERROR 1698 (28000): Access denied for user ‘root’@’localhost’ Kegagalan tersebut terjadi karena mysql secara default menggunakan UNIX auth_socket plugin. Solusinya adalah dengan langkah-langkah berikut: $ sudo mysql -u root mysql> USE mysql; mysql> SELECT User, Host, plugin FROM mysql.user; +——————+———————–+ | User | plugin | +——————+———————–+ | root | auth_socket | | mysql.sys | mysql_native_password | | debian-sys-maint | mysql_native_password | +——————+———————–+ Seperti yang terlihat pada hasil query, user root menggunakan auth_socket plugin Ada 2 cara untuk memecahkan masalah ini: a. You can set the root user to use the mysql_native_password plugin b. You can create a new db_user with you system_user (recommended) Option 1: $ sudo mysql -u root # I had to use “sudo” since is new installation mysql> USE mysql; mysql> UPDATE user SET plugin=’mysql_native_password’ WHERE User=’root’; mysql> FLUSH PRIVILEGES; mysql> exit; $ service mysql restart Option 2: (replace YOUR_SYSTEM_USER with the username you have) $ sudo mysql -u root…

Gagal Simpan Schema di MS-SQLServer 2012
Teknologi / 26 November 2016

Yang pernah/sedang mengalami gagal simpan schema pada Microsoft SQLServer 2012, dengan pesan error seperti ini: TITLE: Microsoft SQL Server Management Studio Cannot insert the value NULL into column ‘diagram_id’, table ‘MONAS_ALS.dbo.sysdiagrams’; column does not allow nulls. INSERT fails. The statement has been terminated. The ‘sp_creatediagram’ procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead. (.Net SqlClient Data Provider) Berikur solusi untuk mengobatinya: DROP TABLE dbo.sysdiagrams; GO CREATE TABLE [dbo].[sysdiagrams] ( [name] [sysname] NOT NULL, [principal_id] [int] NOT NULL, [diagram_id] [int] IDENTITY(1,1) PRIMARY KEY, [version] [int] NULL, [definition] [varbinary](max) NULL, CONSTRAINT [UK_principal_name] UNIQUE ([principal_id],[name]) ); GO EXEC sys.sp_addextendedproperty @name=N’microsoft_database_tools_support’, @value=1 , @level0type=N’SCHEMA’, @level0name=N’dbo’, @level1type=N’TABLE’, @level1name=N’sysdiagrams’; GO Semoga bermanfaat 🙂