How to Add Multiple Attributes to Option Element

This article is telling on how to add multiple attributes to an ongoing to be created option element. As a matter in fact, any HTML element can be generated by using Javascript for an instance an option HTML element. The option HTML element itself can have one attribute for containing value which is going to used for further processing. The attribute usually called ‘value’. Below is the snippet code of HTML script showing the description given above :

<div class="form-group">
<label class="col-md-2 control-label">Database (If it is exist) :</label>
<div class="col-md-4">
<select name="databases" id="databases">
<option selected disabled>Choose Database</option>
@foreach($srv['db'] as $db)
<option value="{{$db->id_db}}" version="{{$db->version}}">{{$db->name}} {{$db->version}}</option>
@endforeach
</select>
</div>
</div>

Continue reading “How to Add Multiple Attributes to Option Element”

How to Remove tr From tbody using Javascript

This is a Javascript article related written to discuss a certain point which is mainly focus on how to remove tr or table row which is a type of HTML element from tbody or table body which is also another type of HTML element using Javascript. To remove it, the following is the actual HTML script given as an example :

<table class="table" id="table-app-content">
<thead>
<tr>
<th>Application Name</th>
<th>Application Version</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>

Continue reading “How to Remove tr From tbody using Javascript”

MySQL Error Message : ERROR 1010 (HY000): Error dropping database (can’t rmdir ‘./db’, errno: 39)

This is an article written to describe on how to solve the error generated in MySQL Database Server. The error itself is an error specifically triggered upon dropping a database which in this context is executed through a command typed in MySQL Command Console. The error specifically mentioned in the title of this article “ERROR 1010 (HY000): Error drop database (can’t rmdir ‘./db’, errno:39)”. Where the ‘./db’ in the error message is referring to the name of the database which is going to be dropped.

The error is shown in detail through the execution of the following command :

Continue reading “MySQL Error Message : ERROR 1010 (HY000): Error dropping database (can’t rmdir ‘./db’, errno: 39)”

MySQL Error Message : ERROR 1114 (HY000) at line 4032: The table ‘table’ is full

This is an article where the focus of the main discussion is about how to solve the error message of MySQL Database Server generated upon restoring a dump file into a single database. The error specifically shown in the title of the article which is ‘ERROR 1114 (HY000) at line 4032: The table named ‘table’ is actually full. So, the error happened at the time of restoring a single database is in progress. It is shown as follows :

root@hostname:/etc/mysql/conf.d# mysql -uroot -p mydb < /root/mydb_20170919_140100.sql
Enter password: 
ERROR 1114 (HY000) at line 4780: The table 'xx_first_table' is full
root@hostname:/etc/mysql/conf.d#

As shown in the restoring progress of the database named ‘mydb’ using the dump file named ‘mydb_20170919_140100.sql’ as located in the ‘/root/’, the process eventually stop and generated an error shown in the following highlight :

Continue reading “MySQL Error Message : ERROR 1114 (HY000) at line 4032: The table ‘table’ is full”

How to List All Database in PostgreSQL via Command Line

This article is describing on how to list all database in PostgreSQL Database Server via command line. So, the environment used in order to execute the command to list all database in PostgreSQL Database Server is an environment equipped with a CLI (Command Line Interface). An example of a CLI tool in this context is a terminal or any other interface equipped with a bash prompt.

Steps for listing all database in PostgreSQL via command line will be described in the following steps :

1. Check the PostgreSQL Database Server’s service. It is a necessity for connecting or accessing service of PostgreSQL Database Server. For further reference, read the article titled ‘Check PostgreSQL Service Status’ in this link.

Continue reading “How to List All Database in PostgreSQL via Command Line”

MySQL Error Message : ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

This is an article related on how to solve the error a specified in the title of this article. The error message is ‘ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2). These kinds of error happened exactly at the time of the execution command to log in to MySQL Database Server is executed. The command to log in to MySQL Database Server is shown as follows :

root@hostname:~# mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@hostname:~#

First of all, to solve the problem shown in the above output command which is involving MySQL Database Server preventing user from logging in to MySQL Database Server, below is the steps taken :

1. Check the MySQL Database Server’s service. Checking the service can be done in the following article titled ‘Check MySQL Service Status’ in this link. And the result in checking MySQL Database Server turns out that the service is active as shown in the following output :

Continue reading “MySQL Error Message : ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”

How to Connect to mariadb using MySQL Client

This is an article showing how to connect to mariadb database server using MySQL client. MySQL client is actually can be utilized to connect to mariadb database server. So, in order to connect to mariadb, there are several things to be done can be done in the following steps :

  1. Install MySQL client as follows :

Continue reading “How to Connect to mariadb using MySQL Client”