**Are you sure you have the right connection string? **
And if there are data inside details table?
If so you can try this code:
MySqlConnection myconn = new MySqlConnection("server=localhost;user id=root;password=db;database=workers;");
string strSQL = @"SELECT * FROM details";
MySqlDataAdapter mydata = new MySqlDataAdapter(strSQL, myconn);
DataTable table = new DataTable("myTable");
GridView1.DataSource = table.DefaultView;
//close and dispose all iDisposable objects on the end!
This has to work 100% if all is ok (connection string and if there are data inside table). There is really nothing else that can be wrong for not showing data in dgv.
Put a break point before this code and check if DataTable gets fill up (I means in this code). When Fill() method goes over, put a mouse cursor over "table" and you will see one magnifying glass. Double click on it, and another window will open with the data. There must be the data inside, but I am affraid it will empty (thats why the GridView is empty too).
This means your database table has to data inisde.